# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
103940 | 2019-04-03T11:01:40 Z | Bodo171 | Amusement Park (JOI17_amusement_park) | C++14 | 38 ms | 5132 KB |
#include "Joi.h" #include <vector> #include <algorithm> #include <iostream> using namespace std; static const int nmax=20005; static vector<int> v[nmax]; static int viz[nmax],w[nmax],tt[nmax]; static long long et[nmax]; static int i,j,nr; static void dfs(int x) { viz[x]=1;et[x]=++nr;et[x]%=60; w[x]=1; for(int i=0;i<v[x].size();i++) if(!viz[v[x][i]]) { tt[v[x][i]]=x; dfs(v[x][i]); w[x]+=w[v[x][i]]; } } void Joi(int N, int M, int A[], int B[], long long X, int T) { for(i=0;i<M;i++) { v[A[i]].push_back(B[i]); v[B[i]].push_back(A[i]); } for(i=0;i<N;i++) sort(v[i].begin(),v[i].end()); dfs(0); for(int i = 0; i < N; i++){ MessageBoard(i, (((1LL<<et[i])&X)!=0)); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 1664 KB | Output is correct |
2 | Correct | 5 ms | 1800 KB | Output is correct |
3 | Incorrect | 6 ms | 1932 KB | Wrong Answer [7] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 32 ms | 4828 KB | Output is correct |
2 | Correct | 38 ms | 5112 KB | Output is correct |
3 | Incorrect | 36 ms | 5132 KB | Wrong Answer [7] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 1664 KB | Output is correct |
2 | Correct | 6 ms | 1928 KB | Output is correct |
3 | Correct | 4 ms | 1664 KB | Output is correct |
4 | Correct | 7 ms | 2076 KB | Output is correct |
5 | Correct | 9 ms | 2084 KB | Output is correct |
6 | Correct | 8 ms | 2076 KB | Output is correct |
7 | Correct | 9 ms | 2076 KB | Output is correct |
8 | Correct | 6 ms | 2204 KB | Output is correct |
9 | Correct | 15 ms | 4296 KB | Output is correct |
10 | Correct | 16 ms | 4408 KB | Output is correct |
11 | Correct | 19 ms | 4288 KB | Output is correct |
12 | Correct | 6 ms | 1664 KB | Output is correct |
13 | Correct | 4 ms | 1664 KB | Output is correct |
14 | Correct | 4 ms | 1664 KB | Output is correct |
15 | Correct | 4 ms | 1792 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 30 ms | 4820 KB | Output is correct |
2 | Correct | 28 ms | 4820 KB | Output is correct |
3 | Incorrect | 30 ms | 4912 KB | Wrong Answer [7] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 33 ms | 4800 KB | Output is correct |
2 | Incorrect | 35 ms | 4828 KB | Wrong Answer [7] |
3 | Halted | 0 ms | 0 KB | - |