QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#486258 | #8788. Page on vdome.com | ucup-team3924# | WA | 0ms | 3496kb | C++20 | 596b | 2024-07-21 18:10:35 | 2024-07-21 18:10:35 |
Judging History
answer
#include <bits/stdc++.h>
int main() {
std::cin.tie(NULL);
std::iostream::sync_with_stdio(false);
int N;
std::cin >> N;
if (N >= 10) {
std::cout << 10;
return 0;
}
std::set<int> inside;
int mex = 1;
for (int i = 1; i <= N; i++) {
int val = i;
int rev = 0;
while (val > 0) {
rev = rev * 10 + val % 10;
val /= 10;
}
inside.insert(rev);
}
while (inside.find(mex) != inside.end()) mex++;
std::cerr << mex;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3496kb
input:
5
output:
result:
wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements