Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
40471 奚晨瑞 字符串判等 C++ Accepted 0 MS 252 KB 604 2024-02-10 21:24:19

Tests(1/1):


#include<iostream> #include<cstring> using namespace std; char a[1000],b[1000],a1[1000],b1[1000]; int main() { gets(a); gets(b); int count1=0; int count2=0; for(int i=0;i<strlen(a1);i++){ if(a[i]!=0){ a1[count1]=a[i]; count1++; } } for(int i=0;i<strlen(b1);i++){ if(b[i]!=0){ b1[count2]=b[i]; count2++; } } if(strlen(a1)==strlen(b1)){ bool yes=0; for(int i=0;i<strlen(a1);i++){ if(a1[i]!=b1[i]){ yes=1; break; } } if(yes==0){ cout<<"YES"; } else{ cout<<"NO"; } } else{ cout<<"NO"; } return 0; }


Judgement Protocol: