結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
めうめう🎒
|
| 提出日時 | 2016-02-12 22:22:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 571 bytes |
| コンパイル時間 | 675 ms |
| コンパイル使用メモリ | 73,872 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 04:19:13 |
| 合計ジャッジ時間 | 1,171 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 2 WA * 9 |
コンパイルメッセージ
main.cpp:24:22: warning: multi-character character constant [-Wmultichar]
24 | if(str[i] == '…') how++;
| ^~~
ソースコード
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define INF (1 << 30)
#define INFLL (1LL << 60)
int main() {
string str;
cin >> str;
int how = 0,ans = 0;
cin >> str;
for(int i = 0;i < str.size();i++){
if(str[i] == '…') how++;
else{
ans = max(ans,how);
how = 0;
}
}
cout << how << endl;
return 0;
}
めうめう🎒