Submission #130628

# Submission time Handle Problem Language Result Execution time Memory
130628 2019-07-15T18:50:47 Z tutis Amusement Park (JOI17_amusement_park) C++17
0 / 100
27 ms 3420 KB
#include "Joi.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
void Joi(int N, int M, int A[], int B[], long long X, int T) {
	vector<int>PP(N);
	iota(PP.begin(), PP.end(), 0);
	shuffle(PP.begin(), PP.end(), mt19937_64(15651));
	int bitas[N];
	int t = 0;
	for (int i : PP)
	{
		bitas[i] = t;
		t = (t + 1) % 60;
	}
	for (int i = 0; i < N; i++)
	{
		int s = 0;
		if ((X & (1ll << bitas[i])) > 0)
			s = 1;
		MessageBoard(i, s);
	}
}
#include "Ioi.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
mt19937_64 rng(1561561);
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T)
{
	vector<int>PP(N);
	iota(PP.begin(), PP.end(), 0);
	shuffle(PP.begin(), PP.end(), mt19937_64(15651));
	int bitas[N];
	int t = 0;
	for (int i : PP)
	{
		bitas[i] = t;
		t = (t + 1) % 60;
	}
	vector<int>adj[N];
	for (int i = 0; i < M; i++)
	{
		adj[A[i]].push_back(B[i]);
		adj[B[i]].push_back(A[i]);
	}
	set<int>aplankyti;
	set<int>bitai;
	ll X = 0;
	while (true)
	{
		X |= V * (1ll << bitas[P]);
		bitai.insert(bitas[P]);
		aplankyti.insert(P);
		if (bitai.size() == 60)
			break;
		shuffle(adj[P].begin(), adj[P].end(), rng);
		int v1 = adj[P][0];
		V = Move(v1);
		P = v1;
	}
	return X;
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 768 KB Output is correct
2 Correct 4 ms 756 KB Output is correct
3 Correct 4 ms 924 KB Output is correct
4 Correct 4 ms 884 KB Output is correct
5 Correct 4 ms 884 KB Output is correct
6 Correct 5 ms 844 KB Output is correct
7 Incorrect 6 ms 764 KB Wrong Answer [8]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 27 ms 3016 KB Output is correct
2 Correct 27 ms 3200 KB Output is correct
3 Correct 27 ms 3416 KB Output is correct
4 Correct 18 ms 2456 KB Output is correct
5 Incorrect 19 ms 2584 KB Wrong Answer [8]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 756 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 27 ms 2752 KB Partially correct
2 Partially correct 27 ms 3320 KB Partially correct
3 Partially correct 27 ms 3420 KB Partially correct
4 Incorrect 17 ms 2508 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 2880 KB Output isn't correct
2 Halted 0 ms 0 KB -