提交时间:2024-02-10 21:20:05
运行 ID: 40470
#include<iostream> #include<cstring> using namespace std; char a[1000],b[1000]; int main() { gets(a); gets(b); if(strlen(a)==strlen(b)){ bool yes=0; for(int i=0;i<strlen(a);i++){ if(a[i]!=b[i]){ yes=1; break; } } if(yes==0){ cout<<"YES"; } else{ cout<<"NO"; } } else{ cout<<"NO"; } return 0; }