Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
41615 | jiabokai | 字符串判等 | C++ | Accepted | 0 MS | 240 KB | 401 | 2024-02-22 08:31:14 |
#include<bits/stdc++.h> using namespace std; string s1,s2; int main() { getline(cin,s1); getline(cin,s2); int i=0,j=0; while(i<s1.size()||j<s2.size()){ if(s1[i]==' '){ i++; }else if(s2[j]==' '){ j++; }else{ if(s1[i]==s2[j]||s1[i]+32==s2[j]||s1[i]==s2[j]+32){ i++; j++; }else{ cout<<"NO"; return 0; } } } cout<<"YES"; return 0; }