結果

問題 No.932 解法破綻!高橋君
ユーザー GetDigit()GetDigit()
提出日時 2022-11-10 10:52:26
言語 C++14
(gcc 12.2.0 + boost 1.81.0)
結果
WA  
実行時間 -
コード長 839 bytes
コンパイル時間 1,798 ms
コンパイル使用メモリ 168,236 KB
実行使用メモリ 8,992 KB
最終ジャッジ日時 2023-07-09 16:29:40
合計ジャッジ時間 2,559 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
4,372 KB
testcase_05 AC 1 ms
4,368 KB
testcase_06 AC 1 ms
4,368 KB
testcase_07 AC 2 ms
4,368 KB
testcase_08 AC 1 ms
4,372 KB
testcase_09 AC 2 ms
4,368 KB
testcase_10 AC 2 ms
4,368 KB
testcase_11 AC 1 ms
4,496 KB
testcase_12 AC 2 ms
4,368 KB
testcase_13 AC 1 ms
4,372 KB
testcase_14 AC 2 ms
4,372 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 17 ms
8,992 KB
testcase_19 AC 16 ms
8,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

std::vector<std::string> split(std::string str, char del) {
    int first = 0;
    int last = str.find_first_of(del);
 
    std::vector<std::string> result;
 
    while (first < str.size()) {
        std::string subStr(str, first, last - first);
 
        result.push_back(subStr);
 
        first = last + 1;
        last = str.find_first_of(del, first);
 
        if (last == std::string::npos) {
            last = str.size();
        }
    }
 
    return result;
}
 
int main() {
    std::string str;
    char del = ',';
    bool flag = true;
    cin >> str;
    for (const auto subStr : split(str, del)) {
        if(!subStr.compare("AC")){
            flag = false;
        }
    }
    if(flag){
        printf("Done!");
    } else {
        printf("Failed...");
    }
 
    return 0;
}
0