ログインしてください。
提出 #1030006
ソースコード 拡げる
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
string s = "";
cin >> s;
int lv = 0;
int lv_ = 0;
bool Flag_lvup = false;
for (auto it = s.begin(); it != s.end(); it++)
{
if ((*it == '2' || *it == '?' )&& ( *(it + 1) == '5' || *(it + 1)== '?'))
{
Flag_lvup = true;
lv_ += 2;
it++;
}
else
{
Flag_lvup = false;
lv = max(lv, lv_);
lv_ = 0;
}
}
cout << lv << endl;
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - ニコニコレベル |
| ユーザ | matiyan |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 0 |
| コード長 | 496 Byte |
| 結果 | WA |
| 実行時間 | 7 ms |
| メモリ | 512 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 300 | ||||||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt |
| All | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, large_01.txt, large_02.txt, large_03.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| hand_01.txt | AC | 3 ms | 256 KiB |
| hand_02.txt | WA | 3 ms | 256 KiB |
| hand_03.txt | WA | 3 ms | 256 KiB |
| hand_04.txt | WA | 3 ms | 256 KiB |
| hand_05.txt | WA | 6 ms | 512 KiB |
| large_01.txt | AC | 6 ms | 512 KiB |
| large_02.txt | WA | 6 ms | 512 KiB |
| large_03.txt | AC | 6 ms | 512 KiB |
| random_01.txt | WA | 7 ms | 512 KiB |
| random_02.txt | WA | 6 ms | 512 KiB |
| random_03.txt | WA | 6 ms | 512 KiB |
| random_04.txt | AC | 6 ms | 512 KiB |
| sample_01.txt | AC | 3 ms | 256 KiB |
| sample_02.txt | AC | 3 ms | 256 KiB |
| sample_03.txt | AC | 3 ms | 256 KiB |
| sample_04.txt | WA | 3 ms | 256 KiB |
| sample_05.txt | AC | 3 ms | 256 KiB |