# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400606 | 2021-05-08T11:55:29 Z | dolphingarlic | Hidden Sequence (info1cup18_hidden) | C++14 | 9 ms | 328 KB |
#include <bits/stdc++.h> #include "grader.h" using namespace std; vector<int> findSequence(int N) { int zeroes = 0; for (int i = 1; i <= N; i++) { vector<int> tst; for (int j = 0; j < i; j++) tst.push_back(0); if (isSubsequence(tst)) zeroes++; else break; } vector<int> ans; while (zeroes) { int ones = 0; for (int i = 1; i <= N; i++) { vector<int> tst = ans; for (int j = 0; j < i; j++) tst.push_back(1); for (int j = 0; j < zeroes; j++) tst.push_back(0); if (tst.size() > N) break; if (isSubsequence(tst)) ones++; else break; } for (int i = 0; i < ones; i++) ans.push_back(1); ans.push_back(0); zeroes--; } while (ans.size() < N) ans.push_back(1); return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 1 ms | 200 KB | Output is partially correct: Maximum length of a query = 8 |
2 | Partially correct | 1 ms | 200 KB | Output is partially correct: Maximum length of a query = 10 |
3 | Partially correct | 1 ms | 200 KB | Output is partially correct: Maximum length of a query = 8 |
4 | Correct | 1 ms | 200 KB | Output is correct: Maximum length of a query = 5 |
5 | Partially correct | 1 ms | 220 KB | Output is partially correct: Maximum length of a query = 7 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 6 ms | 324 KB | Output is partially correct: Maximum length of a query = 165 |
2 | Partially correct | 7 ms | 304 KB | Output is partially correct: Maximum length of a query = 178 |
3 | Partially correct | 9 ms | 200 KB | Output is partially correct: Maximum length of a query = 188 |
4 | Partially correct | 5 ms | 328 KB | Output is partially correct: Maximum length of a query = 151 |
5 | Partially correct | 8 ms | 200 KB | Output is partially correct: Maximum length of a query = 188 |
6 | Partially correct | 7 ms | 200 KB | Output is partially correct: Maximum length of a query = 172 |
7 | Partially correct | 7 ms | 200 KB | Output is partially correct: Maximum length of a query = 192 |
8 | Partially correct | 7 ms | 200 KB | Output is partially correct: Maximum length of a query = 164 |
9 | Partially correct | 7 ms | 328 KB | Output is partially correct: Maximum length of a query = 200 |
10 | Partially correct | 8 ms | 204 KB | Output is partially correct: Maximum length of a query = 199 |
11 | Partially correct | 8 ms | 300 KB | Output is partially correct: Maximum length of a query = 190 |
12 | Partially correct | 7 ms | 312 KB | Output is partially correct: Maximum length of a query = 199 |
13 | Partially correct | 8 ms | 308 KB | Output is partially correct: Maximum length of a query = 200 |