結果
問題 | No.932 解法破綻!高橋君 |
ユーザー |
![]() |
提出日時 | 2022-11-10 10:47:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 575 bytes |
コンパイル時間 | 1,620 ms |
コンパイル使用メモリ | 168,632 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 13:35:19 |
合計ジャッジ時間 | 2,381 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ string str, separator(","); bool flag = true; cin >> str; string tstr = str + separator; long l = tstr.length(), sl = separator.length(); string::size_type pos = 0, prev = 0; for (;pos < l && (pos = tstr.find(separator, pos)) != string::npos; prev = (pos += sl)) { string item = tstr.substr(prev, pos - prev); if(!item.compare("AC\n")){ flag = false; } } if(flag){ cout << "Done!"; } else { cout << "Failed..."; } }