結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
piyoko_212
|
| 提出日時 | 2015-12-28 22:02:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 256 bytes |
| コンパイル時間 | 207 ms |
| コンパイル使用メモリ | 33,608 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-18 09:38:02 |
| 合計ジャッジ時間 | 1,168 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s",str);
| ~~~~~^~~~~~~~~~
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s",str+7);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<algorithm>
using namespace std;
char str[3000];
int main(){
scanf("%s",str);
scanf("%s",str+7);
int ret=0;
int cur=0;
for(int i=0;i<14;i++){
if(str[i]=='o')cur++;
else cur=0;
ret=max(ret,cur);
}
printf("%d\n",ret);
}
piyoko_212