結果
| 問題 |
No.2035 Tunnel
|
| コンテスト | |
| ユーザー |
Manuel1024
|
| 提出日時 | 2022-09-05 03:29:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 293 bytes |
| コンパイル時間 | 588 ms |
| コンパイル使用メモリ | 67,888 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-19 12:20:44 |
| 合計ジャッジ時間 | 1,558 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
int n; cin >> n;
string s; cin >> s;
int ans = -1001001001;
for(int i = n-1; i >= 0; i--){
if(s[i] == '#') ans = max(ans+2, n-i);
}
cout << ans << endl;
return 0;
}
Manuel1024