結果
問題 |
No.341 沈黙の期間
|
ユーザー |
|
提出日時 | 2016-11-19 17:14:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 424 bytes |
コンパイル時間 | 1,490 ms |
コンパイル使用メモリ | 168,724 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-26 22:03:44 |
合計ジャッジ時間 | 2,141 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 2 WA * 9 |
コンパイルメッセージ
main.cpp:6:19: warning: multi-character character constant [-Wmultichar] 6 | if( s[ i ] != '…' ) | ^~~
ソースコード
#include <bits/stdc++.h> using namespace std; bool silent( string s ){ for( int i = 0; i < s.size(); ++i ) if( s[ i ] != '…' ) return false; return true; } signed main(){ string s; cin >> s; int ans = 0; for( int i = 0; i < s.size(); ++i ) for( int j = i; j < s.size(); ++j ) if( silent( s.substr( i, j - i + 1 ) ) ) ans = max( ans, j - i + 1 ); cout << ans << endl; return 0; }