QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#59726 | #1371. Missing Number | abdelrahman001# | WA | 0ms | 3428kb | C++20 | 688b | 2022-10-31 22:19:13 | 2022-10-31 22:19:17 |
Judging History
answer
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
const int N = 1e5 + 5;
int n;
string s;
bool done[N];
int main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> n >> s;
int cur = 1;
for(int j = 0;j < s.size();j++) {
string tmp = to_string(cur);
if(j + tmp.size() > s.size())
return cout << cur, 0;
if(s.substr(j, tmp.size()) == tmp) {
j += tmp.size() - 1;
cur++;
} else {
return cout << cur, 0;
}
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3428kb
input:
2 1
output:
result:
wrong answer 1st lines differ - expected: '2', found: ''