# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
49928 | 2018-06-05T03:45:25 Z | MatheusLealV | Amusement Park (JOI17_amusement_park) | C++17 | 44 ms | 11520 KB |
#include "Joi.h" #include <bits/stdc++.h> #define maxn 10005 #define f first #define s second using namespace std; typedef long long ll; typedef pair<int, int> pii; static int idx[maxn], pai[maxn], deep[maxn], cnt, maior; static vector<int> grafo[maxn], tree[maxn]; void dfs(int x) { idx[x] = cnt++; maior = max(maior, deep[x] + 1); for(auto v: grafo[x]) { if(idx[v] != -1) continue; pai[v] = x; deep[v] = deep[x] + 1; tree[x].push_back(v); tree[v].push_back(x); dfs(v); } } void Joi(int N, int M, int A[], int B[], ll X, int T) { memset(idx, -1, sizeof idx); for(int i = 0; i < M; i++) { grafo[A[i]].push_back(B[i]); grafo[B[i]].push_back(A[i]); } for(int i = 0; i < N; i++) sort(grafo[i].begin(), grafo[i].end()); dfs(0); for(int i = 0; i < N; i++) { idx[i] = idx[i] % 60; if(X & (1LL<<idx[i])) MessageBoard(i, 1); else MessageBoard(i, 0); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 2404 KB | Output is correct |
2 | Correct | 7 ms | 3188 KB | Output is correct |
3 | Correct | 6 ms | 3344 KB | Output is correct |
4 | Correct | 6 ms | 3452 KB | Output is correct |
5 | Correct | 6 ms | 3560 KB | Output is correct |
6 | Correct | 6 ms | 3560 KB | Output is correct |
7 | Correct | 8 ms | 3560 KB | Output is correct |
8 | Correct | 6 ms | 3560 KB | Output is correct |
9 | Correct | 5 ms | 3560 KB | Output is correct |
10 | Correct | 7 ms | 3560 KB | Output is correct |
11 | Correct | 12 ms | 3776 KB | Output is correct |
12 | Correct | 6 ms | 3992 KB | Output is correct |
13 | Correct | 6 ms | 3992 KB | Output is correct |
14 | Correct | 6 ms | 3992 KB | Output is correct |
15 | Correct | 6 ms | 3992 KB | Output is correct |
16 | Correct | 7 ms | 3992 KB | Output is correct |
17 | Correct | 6 ms | 3992 KB | Output is correct |
18 | Correct | 7 ms | 3992 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 41 ms | 7380 KB | Output is correct |
2 | Correct | 39 ms | 8472 KB | Output is correct |
3 | Correct | 44 ms | 8472 KB | Output is correct |
4 | Correct | 25 ms | 8472 KB | Output is correct |
5 | Correct | 27 ms | 8472 KB | Output is correct |
6 | Correct | 27 ms | 8472 KB | Output is correct |
7 | Incorrect | 31 ms | 8472 KB | Wrong Answer [7] |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 8472 KB | Output is correct |
2 | Correct | 5 ms | 8472 KB | Output is correct |
3 | Correct | 5 ms | 8472 KB | Output is correct |
4 | Correct | 8 ms | 8472 KB | Output is correct |
5 | Correct | 8 ms | 8472 KB | Output is correct |
6 | Correct | 10 ms | 8472 KB | Output is correct |
7 | Correct | 9 ms | 8472 KB | Output is correct |
8 | Correct | 7 ms | 8472 KB | Output is correct |
9 | Correct | 20 ms | 8472 KB | Output is correct |
10 | Correct | 23 ms | 8472 KB | Output is correct |
11 | Correct | 24 ms | 8472 KB | Output is correct |
12 | Correct | 5 ms | 8472 KB | Output is correct |
13 | Correct | 5 ms | 8472 KB | Output is correct |
14 | Correct | 5 ms | 8472 KB | Output is correct |
15 | Correct | 7 ms | 8472 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 40 ms | 8472 KB | Output is correct |
2 | Correct | 39 ms | 8472 KB | Output is correct |
3 | Correct | 44 ms | 8472 KB | Output is correct |
4 | Correct | 24 ms | 8472 KB | Output is correct |
5 | Correct | 26 ms | 8472 KB | Output is correct |
6 | Correct | 29 ms | 8472 KB | Output is correct |
7 | Correct | 25 ms | 8472 KB | Output is correct |
8 | Correct | 24 ms | 8472 KB | Output is correct |
9 | Correct | 26 ms | 8472 KB | Output is correct |
10 | Correct | 24 ms | 8472 KB | Output is correct |
11 | Correct | 24 ms | 8472 KB | Output is correct |
12 | Correct | 24 ms | 8472 KB | Output is correct |
13 | Correct | 28 ms | 8504 KB | Output is correct |
14 | Correct | 26 ms | 8544 KB | Output is correct |
15 | Correct | 29 ms | 8552 KB | Output is correct |
16 | Correct | 27 ms | 8616 KB | Output is correct |
17 | Correct | 27 ms | 8912 KB | Output is correct |
18 | Correct | 27 ms | 9244 KB | Output is correct |
19 | Correct | 25 ms | 9556 KB | Output is correct |
20 | Incorrect | 20 ms | 10208 KB | Wrong Answer [7] |
21 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 40 ms | 11084 KB | Output is correct |
2 | Incorrect | 40 ms | 11520 KB | Wrong Answer [7] |
3 | Halted | 0 ms | 0 KB | - |