Submission #00083
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #include<bits/stdc++.h> using namespace std; int main(){ while (1){ vector<string>vec1; vector<string>vec2; bool f=0; string a,b,str= "" ,c= "" ,d= "" ; cin>>a; if (a== "." ) break ; cin>>b; if (a==b){ cout<< "IDENTICAL" <<endl; continue ; } for ( int i=0;i<a.size();i++){ if (a[i]== '\"' ){ if (f==0)f=1; else { f=0; vec1.push_back(str); str= "" ; c+= '*' ; } } else if (f==1){ str+=a[i]; } else c+=a[i]; } f=0; str= "" ; int cnt=0; for ( int i=0;i<b.size();i++){ if (b[i]== '\"' ){ if (f==0)f=1; else { f=0; vec2.push_back(str); str= "" ; d+= '*' ; } } else if (f==1){ str+=b[i]; } else d+=b[i]; } if (vec1.size()==vec2.size()){ for ( int i=0;i<vec1.size();i++){ if (vec1[i]!=vec2[i]){ cnt++; } } if (cnt==1&&c==d)cout<< "CLOSE" <<endl; else cout<< "DIFFERENT" <<endl; } else cout<< "DIFFERENT" <<endl; //cout<<c<<' '<<d<<endl; } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0003 - ほとんど同じプログラム |
ユーザー名 | r1705 |
投稿日時 | 2018-03-30 13:46:10 |
言語 | C++11 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 1075 Byte |
最大実行時間 | 24 ms |
最大メモリ使用量 | 504 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 10 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
B1 | AC | 21 ms | 476 KB |
1
|
B2 | AC | 23 ms | 440 KB |
1
|
B3 | AC | 24 ms | 408 KB |
1
|
B4 | AC | 22 ms | 504 KB |
1
|