結果
| 問題 | No.3210 Fixed Sign Sequense |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-05-04 05:55:11 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 608 bytes |
| 記録 | |
| コンパイル時間 | 1,116 ms |
| コンパイル使用メモリ | 180,236 KB |
| 実行使用メモリ | 10,576 KB |
| 最終ジャッジ日時 | 2026-05-04 05:55:33 |
| 合計ジャッジ時間 | 5,169 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | TLE * 1 -- * 37 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
int32_t main(){
int n;
cin >> n;
string s;
cin.ignore();
getline(cin, s);
set<int> c;
for(int i = 0; i < n-1; i++){
int count = 1;
char x = s[i];
for(int j = i+1; j < n; j++){
if(x == '-'){
count++;
x = s[j];
}
else if((x == '0' || x == '+') && s[j] == '+'){
count++;
x = s[j];
}
}
c.insert(count);
}
cout << *c.rbegin() << endl;
return 0;
}
vjudge1