結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー 29da16429da164
提出日時 2020-07-27 14:37:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 512 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 64,216 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-11 05:50:20
合計ジャッジ時間 1,873 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>

int main(void){
  using namespace std;
  char d[14];
  int x=0;

  for(int i=0;i<14;i++){
    cin >> d[i];
    if(d[i]=='x') x++;
  }
  int imax=1, iimax=1;
  
  if(x==14) cout << 0 <<endl;
  else{  
    for(int i=1;i<14;i++){
      if(d[i-1]=='o' && d[i]=='o'){
        imax++;
        iimax=imax;
        //cout << iimax;
      }
      if(d[i-1]=='o' && d[i]=='x'){
        iimax=imax;
        //cout << iimax;
        imax=1;
      }
    }
    cout << iimax << endl;
  }
  return 0;    
}
0