結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー Hank
提出日時 2016-08-16 22:28:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 475 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 57,820 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-18 09:47:10
合計ジャッジ時間 1,179 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string.h>
#include <vector>
using namespace std;

int main(){
  /*
  const int count = 14;
  std::vector<char> day(14);
  for (size_t i = 0; i < count; i++){
    cin >> day[i];
    if(day[i]=='x')
    cout << "aaa";
  }
  */
  const int count = 14;
  char a;
  int result=0,num=0;
  for (size_t i = 0; i < count; i++) {
    cin >> a;
    (a == 'x')?(num = 0):(num = num+1);
    (num > result)?(result = num):(0);
  }
  cout << result << endl;
}
0