# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1072483 | 2024-08-23T19:51:46 Z | pawned | Mechanical Doll (IOI18_doll) | C++17 | 14 ms | 10776 KB |
#pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops") #include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; #include "doll.h" void create_circuit(int M, vi A) { int N = A.size(); /* cout<<"A: "; for (int i = 0; i < N; i++) { cout<<A[i]<<" "; } cout<<endl;*/ vi allr[M + 1]; allr[0].pb(A[0]); for (int i = 0; i < M - 1; i++) { allr[A[i]].pb(A[i + 1]); } /* cout<<"allr: "<<endl; for (int i = 0; i < M; i++) { cout<<i<<": "; for (int x : allr[i]) cout<<x<<" "; cout<<endl; }*/ vi ans(M + 1, 0); for (int i = 0; i <= M; i++) { if (allr[i].size() != 0) ans[i] = allr[i][0]; } // create binary tree answer(ans, {}, {}); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Runtime error | 14 ms | 10776 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Runtime error | 14 ms | 10776 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Runtime error | 14 ms | 10776 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |