結果
| 問題 | No.932 解法破綻!高橋君 | 
| コンテスト | |
| ユーザー |  LV3zJigVW57oPGy | 
| 提出日時 | 2022-11-19 13:06:56 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 10 ms / 2,000 ms | 
| コード長 | 691 bytes | 
| コンパイル時間 | 1,433 ms | 
| コンパイル使用メモリ | 161,232 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-20 13:51:49 | 
| 合計ジャッジ時間 | 1,936 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 20 | 
ソースコード
#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...";
  }
}
            
            
            
        