結果

問題 No.932 解法破綻!高橋君
ユーザー LV3zJigVW57oPGyLV3zJigVW57oPGy
提出日時 2022-11-19 12:59:56
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 596 bytes
コンパイル時間 2,255 ms
コンパイル使用メモリ 162,016 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-20 13:43:52
合計ジャッジ時間 2,337 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 WA * 1
権限があれば一括ダウンロードができます

ソースコード

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 (muri==0)cout << "Done!";
  else cout << "Failed..."; 
}
0