# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
172646 | 2020-01-02T09:22:04 Z | emil_physmath | "The Lyuboyn" code (IZhO19_lyuboyn) | C++17 | 775 ms | 26004 KB |
#include <algorithm> #include <vector> #include <string> #include <iostream> using namespace std; vector<string> a; void Get(int n, int k) { // cerr << n << ", " << k << endl; if (k == 1) { if (n == 1) { a.resize(2); a[0] = "0"; a[1] = "1"; return; } Get(n - 1, k); a.resize(2 * a.size()); for (int i = 0; i < a.size(); ++i) { a[i].insert(a[i].begin(), (i < a.size() / 2 ? '0' : '1')); a[i].resize(n); } for (int j = 1; j < n; ++j) for (int r = a.size() / 2, l = a.size() / 2 - 1; r < a.size(); ++r, --l) a[r][j] = a[l][j]; } } int main() { int n, k, t; cin >> n >> k >> t; string s; cin >> s; Get(n, k); cout << a.size() << endl; for (auto it = find(a.begin(), a.end(), s); it != a.end(); ++it) cout << *it << endl; for (int i = 0; a[i] != s; ++i) cout << a[i] << endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 480 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 775 ms | 26004 KB | Ok |
2 | Correct | 384 ms | 13008 KB | Ok |
3 | Correct | 5 ms | 376 KB | Ok |
4 | Correct | 2 ms | 256 KB | Ok |
5 | Correct | 2 ms | 256 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 775 ms | 26004 KB | Ok |
2 | Correct | 384 ms | 13008 KB | Ok |
3 | Correct | 5 ms | 376 KB | Ok |
4 | Correct | 2 ms | 256 KB | Ok |
5 | Correct | 2 ms | 256 KB | Ok |
6 | Runtime error | 1 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |