Submission #37582

# Submission time Handle Problem Language Result Execution time Memory
37582 2017-12-26T08:18:31 Z grumpy_gordon Amusement Park (JOI17_amusement_park) C++14
18 / 100
46 ms 8140 KB
#include <bits/stdc++.h>
#include "Joi.h"
using namespace std;

void Joi(int N, int M, int A[], int B[], long long X, int T){
	for (int i = 0; i < 60; i++)
	if ((1ll << i) & X)
		MessageBoard(i, 1);
  	else
      	MessageBoard(i, 0);
  	for (int i = 60; i < N; i++)
		MessageBoard(i, 0);
}
#include <bits/stdc++.h>
#include "Ioi.h"
using namespace std;

const int maxn = 1e5 + 100;

int a[maxn];

vector<int> e[maxn];

bool vis[maxn];

void dfs(int v, int val){
  	vis[v] = 1;
  	a[v] = val;
  	for (auto i : e[v])
    if (!vis[i]){
      	dfs(i, Move(i));
      	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++)
		e[A[i]].push_back(B[i]), e[B[i]].push_back(A[i]);
  	dfs(P, V);
  	long long ret = 0;
  	for (int i = 0; i < 60; i++)
		ret += (1ll << i) * a[i];
  	return ret;
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 7576 KB Output is correct
2 Correct 0 ms 7576 KB Output is correct
3 Correct 0 ms 7576 KB Output is correct
4 Correct 0 ms 7576 KB Output is correct
5 Correct 0 ms 7576 KB Output is correct
6 Correct 0 ms 7576 KB Output is correct
7 Correct 0 ms 7576 KB Output is correct
8 Correct 3 ms 7576 KB Output is correct
9 Correct 0 ms 7576 KB Output is correct
10 Correct 0 ms 7576 KB Output is correct
11 Correct 6 ms 7708 KB Output is correct
12 Correct 0 ms 7576 KB Output is correct
13 Correct 0 ms 7576 KB Output is correct
14 Correct 0 ms 7576 KB Output is correct
15 Correct 0 ms 7576 KB Output is correct
16 Correct 0 ms 7576 KB Output is correct
17 Correct 0 ms 7576 KB Output is correct
18 Correct 0 ms 7576 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 8128 KB Output is correct
2 Correct 28 ms 8128 KB Output is correct
3 Correct 28 ms 8132 KB Output is correct
4 Correct 16 ms 7972 KB Output is correct
5 Correct 12 ms 8140 KB Output is correct
6 Correct 15 ms 8040 KB Output is correct
7 Correct 19 ms 8020 KB Output is correct
8 Correct 12 ms 8012 KB Output is correct
9 Correct 19 ms 7976 KB Output is correct
10 Correct 15 ms 8036 KB Output is correct
11 Correct 9 ms 8036 KB Output is correct
12 Correct 12 ms 7840 KB Output is correct
13 Correct 12 ms 7840 KB Output is correct
14 Correct 15 ms 7840 KB Output is correct
15 Correct 18 ms 7972 KB Output is correct
16 Correct 12 ms 7972 KB Output is correct
17 Correct 18 ms 7972 KB Output is correct
18 Correct 15 ms 7972 KB Output is correct
19 Correct 18 ms 7972 KB Output is correct
20 Correct 9 ms 7840 KB Output is correct
21 Correct 9 ms 7840 KB Output is correct
22 Correct 22 ms 7840 KB Output is correct
23 Correct 9 ms 7840 KB Output is correct
24 Correct 12 ms 7840 KB Output is correct
25 Correct 22 ms 7840 KB Output is correct
26 Correct 15 ms 7840 KB Output is correct
27 Correct 19 ms 7840 KB Output is correct
28 Correct 9 ms 7840 KB Output is correct
29 Correct 6 ms 7840 KB Output is correct
30 Correct 16 ms 7840 KB Output is correct
31 Correct 0 ms 7576 KB Output is correct
32 Correct 3 ms 7576 KB Output is correct
33 Correct 0 ms 7576 KB Output is correct
34 Correct 0 ms 7576 KB Output is correct
35 Correct 0 ms 7576 KB Output is correct
36 Correct 0 ms 7576 KB Output is correct
37 Correct 0 ms 7576 KB Output is correct
38 Correct 0 ms 7576 KB Output is correct
39 Correct 0 ms 7576 KB Output is correct
40 Correct 0 ms 7576 KB Output is correct
41 Correct 0 ms 7576 KB Output is correct
42 Correct 0 ms 7576 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 7576 KB Output is correct
2 Correct 0 ms 7576 KB Output is correct
3 Correct 0 ms 7576 KB Output is correct
4 Incorrect 3 ms 7708 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 46 ms 8128 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 8120 KB Output isn't correct
2 Halted 0 ms 0 KB -