結果

問題 No.932 解法破綻!高橋君
ユーザー LV3zJigVW57oPGyLV3zJigVW57oPGy
提出日時 2022-11-19 13:06:56
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 691 bytes
コンパイル時間 2,283 ms
コンパイル使用メモリ 162,176 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 18:13:59
合計ジャッジ時間 2,603 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <algorithm>
 
int main(){
  
  string a;
  cin >> a;
  string b;
  int muri = 0;
  int count1 = 0;
  int abcd = 0;
  int cou = count(a.begin(),a.end(),',');
  for(int i=1;i<=cou ;i++){
    int fi = a.find(",",abcd);
   	if(i==1)b = a.substr(0,fi);
    else b = a.substr(count1,fi);
    count1 += b.size()+1;
    // cout << b << endl << fi << endl;
    if(b!="AC"){
      muri++;
      break;
    }
    if(i==cou){
      if(a.substr(count1)!="AC") muri++;
    }
    abcd = fi;
  }
  if(cou==false){
    if(a=="AC")cout << "Done!";
    else cout << "Failed...";
  }
  else{
  if (muri==0)cout << "Done!";
  else cout << "Failed...";
  }
}
0