답안 #166681

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
166681 2019-12-03T13:03:28 Z igba Amusement Park (JOI17_amusement_park) C++14
18 / 100
53 ms 3472 KB
#include "Joi.h"

void Joi(int N, int M, int A[], int B[], long long X, int T) {
	for(int i = 0; i < 60; ++i)
		MessageBoard(i, (X >> i) & 1);
	for(int i = 60; i < N; ++i)
		MessageBoard(i, 0);
}
#include "Ioi.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10010;
bool values[MAXN], flg[MAXN];
vector<int> g[MAXN];

void dfs(int v)
{
	for(const int &u : g[v])
		if(!flg[u])
		{
			flg[u] = true;
			values[u] = Move(u);
			dfs(u);
			Move(v);
		}
}

long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
  for(int i = 0; i < M; ++i)
  	g[A[i]].push_back(B[i]), g[B[i]].push_back(A[i]);
  values[P] = V;
  dfs(P);
  long long ans = 0;
  for(int i = 0; i < 60; ++i)
  	ans |= (1LL << i) * values[i];
  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 1144 KB Output is correct
2 Correct 5 ms 1032 KB Output is correct
3 Correct 4 ms 1156 KB Output is correct
4 Correct 11 ms 1160 KB Output is correct
5 Correct 4 ms 1020 KB Output is correct
6 Correct 4 ms 1148 KB Output is correct
7 Correct 4 ms 1156 KB Output is correct
8 Correct 4 ms 1148 KB Output is correct
9 Correct 4 ms 1116 KB Output is correct
10 Correct 4 ms 1148 KB Output is correct
11 Correct 8 ms 1440 KB Output is correct
12 Correct 4 ms 1020 KB Output is correct
13 Correct 5 ms 1148 KB Output is correct
14 Correct 4 ms 1148 KB Output is correct
15 Correct 4 ms 900 KB Output is correct
16 Correct 4 ms 1148 KB Output is correct
17 Correct 4 ms 1152 KB Output is correct
18 Correct 4 ms 1148 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 31 ms 3028 KB Output is correct
2 Correct 53 ms 3408 KB Output is correct
3 Correct 31 ms 3472 KB Output is correct
4 Correct 19 ms 2344 KB Output is correct
5 Correct 20 ms 2708 KB Output is correct
6 Correct 20 ms 2448 KB Output is correct
7 Correct 20 ms 2472 KB Output is correct
8 Correct 20 ms 2344 KB Output is correct
9 Correct 20 ms 2344 KB Output is correct
10 Correct 19 ms 2360 KB Output is correct
11 Correct 19 ms 2220 KB Output is correct
12 Correct 18 ms 2224 KB Output is correct
13 Correct 18 ms 2116 KB Output is correct
14 Correct 19 ms 2216 KB Output is correct
15 Correct 20 ms 2220 KB Output is correct
16 Correct 19 ms 2352 KB Output is correct
17 Correct 19 ms 2344 KB Output is correct
18 Correct 19 ms 2352 KB Output is correct
19 Correct 20 ms 2468 KB Output is correct
20 Correct 16 ms 2364 KB Output is correct
21 Correct 16 ms 2596 KB Output is correct
22 Correct 20 ms 2344 KB Output is correct
23 Correct 20 ms 2348 KB Output is correct
24 Correct 20 ms 2480 KB Output is correct
25 Correct 20 ms 2564 KB Output is correct
26 Correct 20 ms 2716 KB Output is correct
27 Correct 20 ms 2344 KB Output is correct
28 Correct 20 ms 2344 KB Output is correct
29 Correct 20 ms 2328 KB Output is correct
30 Correct 18 ms 2336 KB Output is correct
31 Correct 4 ms 1020 KB Output is correct
32 Correct 4 ms 1036 KB Output is correct
33 Correct 4 ms 1000 KB Output is correct
34 Correct 5 ms 1132 KB Output is correct
35 Correct 4 ms 1020 KB Output is correct
36 Correct 4 ms 1020 KB Output is correct
37 Correct 4 ms 1020 KB Output is correct
38 Correct 4 ms 1152 KB Output is correct
39 Correct 4 ms 892 KB Output is correct
40 Correct 5 ms 892 KB Output is correct
41 Correct 4 ms 1024 KB Output is correct
42 Correct 4 ms 1152 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 892 KB Output is correct
2 Correct 4 ms 1160 KB Output is correct
3 Correct 4 ms 1120 KB Output is correct
4 Incorrect 6 ms 1380 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 31 ms 3216 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 30 ms 3344 KB Output isn't correct
2 Halted 0 ms 0 KB -