結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-05 01:54:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 565 bytes |
| コンパイル時間 | 522 ms |
| コンパイル使用メモリ | 81,152 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-27 20:57:14 |
| 合計ジャッジ時間 | 1,025 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 2 WA * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:30:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
30 | scanf("%s",s);
| ~~~~~^~~~~~~~
ソースコード
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>
using namespace std;
int gcd(int x,int y){
return y?gcd(y,x%y):x;
}
int main() {
unsigned char s[999];
scanf("%s",s);
int r=0,w=0;
int i=0;
while(s[i]){
if(s[i]==-30&&s[i+1]==-128&&s[i+2]==-90){r++,i+=2;}
else r=0;
w=max(r,w);
i++;
}
cout<<w<<endl;
return 0;
}