結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
greentea011
|
| 提出日時 | 2019-04-11 11:30:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 307 bytes |
| コンパイル時間 | 139 ms |
| コンパイル使用メモリ | 30,592 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 08:56:28 |
| 合計ジャッジ時間 | 874 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 16 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:5:9: warning: 'max' may be used uninitialized [-Wmaybe-uninitialized]
5 | int max;
| ^~~
ソースコード
#include <stdio.h>
int main() {
char c;
int max;
int a=0;
for (int i=0; i<15; i++) {
scanf("%c",&c);
if (i==7) continue;
if (c=='x') {
max=(a>max)?a:max;
a=0;
}
else {
a++;
}
}
printf("%d\n",max);
}
greentea011