# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1068210 | 2024-08-21T08:34:00 Z | Sir_Ahmed_Imran | Mechanical Doll (IOI18_doll) | C++17 | 46 ms | 13616 KB |
///~~~LOTA~~~/// #include "doll.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define append push_back #define add insert #define nl '\n' #define ff first #define ss second #define pii pair<int,int> #define pll pair<ll,ll> #define all(x) (x).begin(),(x).end() #define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define terminator main #define N 100001 vector<int> p[N]; void create_circuit(int m,vector<int> a){ vector<int> c,x,y; c.append(a[0]); a.append(0); int o=-1; for(int i=0;i<a.size();i++) p[a[i]].append(i+1); for(int i=1;i<=m;i++){ c.append(0); if(p[i].size()==1) c[i]=a[p[i][0]]; if(p[i].size()>1){ c[i]=o; o--; x.append(a[p[i][0]]); y.append(a[p[i][1]]); } } answer(c,x,y); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2652 KB | Output is correct |
2 | Correct | 20 ms | 7016 KB | Output is correct |
3 | Correct | 19 ms | 6508 KB | Output is correct |
4 | Correct | 1 ms | 2652 KB | Output is correct |
5 | Correct | 6 ms | 4052 KB | Output is correct |
6 | Correct | 22 ms | 8508 KB | Output is correct |
7 | Correct | 1 ms | 2652 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2652 KB | Output is correct |
2 | Correct | 20 ms | 7016 KB | Output is correct |
3 | Correct | 19 ms | 6508 KB | Output is correct |
4 | Correct | 1 ms | 2652 KB | Output is correct |
5 | Correct | 6 ms | 4052 KB | Output is correct |
6 | Correct | 22 ms | 8508 KB | Output is correct |
7 | Correct | 1 ms | 2652 KB | Output is correct |
8 | Correct | 31 ms | 9868 KB | Output is correct |
9 | Correct | 31 ms | 10680 KB | Output is correct |
10 | Correct | 43 ms | 13616 KB | Output is correct |
11 | Correct | 1 ms | 2652 KB | Output is correct |
12 | Correct | 1 ms | 2652 KB | Output is correct |
13 | Correct | 1 ms | 2652 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2652 KB | Output is correct |
2 | Correct | 20 ms | 7016 KB | Output is correct |
3 | Correct | 19 ms | 6508 KB | Output is correct |
4 | Correct | 1 ms | 2652 KB | Output is correct |
5 | Correct | 6 ms | 4052 KB | Output is correct |
6 | Correct | 22 ms | 8508 KB | Output is correct |
7 | Correct | 1 ms | 2652 KB | Output is correct |
8 | Correct | 31 ms | 9868 KB | Output is correct |
9 | Correct | 31 ms | 10680 KB | Output is correct |
10 | Correct | 43 ms | 13616 KB | Output is correct |
11 | Correct | 1 ms | 2652 KB | Output is correct |
12 | Correct | 1 ms | 2652 KB | Output is correct |
13 | Correct | 1 ms | 2652 KB | Output is correct |
14 | Incorrect | 46 ms | 11060 KB | wrong motion |
15 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 2652 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 2792 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 2792 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |