結果

問題 No.932 解法破綻!高橋君
コンテスト
ユーザー LV3zJigVW57oPGy
提出日時 2022-11-19 13:06:56
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 691 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,488 ms
コンパイル使用メモリ 180,664 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-09 00:40:49
合計ジャッジ時間 4,902 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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