Submission #666207

#TimeUsernameProblemLanguageResultExecution timeMemory
666207rainboyShopping (JOI21_shopping)C++17
0 / 100
65 ms12468 KiB
#include "Anna.h"
#include <vector>
#include <cstring>

using namespace std;

namespace A {
	const int N = 1000000;
	int aa[N];
	int n, l, r, h, i;
}

using namespace A;

void InitA(int N, int L, int R) {
	n = N, l = L, r = R;
	memset(aa, 0, n * sizeof *aa);
}

void ReceiveA(bool x) {
	i = 0, h = 0;
	if (x)
		aa[i] |= 1 << h;
	if (++h == 10)
		i++, h = 0;
}

int Answer() {
	int i_ = -1;
	for (int i = l; i <= r; i++)
		if (i_ == -1 || aa[i_] > aa[i])
			i_ = i;
	return i_;
}
#include "Bruno.h"
#include <vector>

using namespace std;

namespace B {
	int n;
}

using namespace B;

typedef vector<int> vi;

void InitB(int N, vi pp) {
	n = N;
	for (int i = 0; i < n; i++)
		for (int h = 0; h < 10; h++)
			SendB(pp[i] >> h & 1);
}

void ReceiveB(bool y) { }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...