Submission #666208

# Submission time Handle Problem Language Result Execution time Memory
666208 2022-11-27T19:14:39 Z rainboy Shopping (JOI21_shopping) C++17
1 / 100
102 ms 4128 KB
#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);
	i = 0, h = 0;
}

void ReceiveA(bool x) {
	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 time Memory Grader output
1 Correct 0 ms 400 KB Output is correct
2 Correct 0 ms 400 KB Output is correct
3 Correct 1 ms 400 KB Output is correct
4 Correct 1 ms 400 KB Output is correct
5 Correct 1 ms 400 KB Output is correct
6 Correct 72 ms 400 KB Output is correct
7 Correct 74 ms 400 KB Output is correct
8 Correct 71 ms 400 KB Output is correct
9 Correct 41 ms 400 KB Output is correct
10 Correct 95 ms 400 KB Output is correct
11 Correct 83 ms 400 KB Output is correct
12 Correct 86 ms 400 KB Output is correct
13 Correct 34 ms 400 KB Output is correct
14 Correct 36 ms 400 KB Output is correct
15 Correct 102 ms 400 KB Output is correct
16 Correct 91 ms 400 KB Output is correct
17 Correct 89 ms 400 KB Output is correct
18 Correct 34 ms 416 KB Output is correct
19 Correct 92 ms 424 KB Output is correct
20 Correct 46 ms 400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 400 KB Output is correct
2 Correct 0 ms 400 KB Output is correct
3 Correct 1 ms 400 KB Output is correct
4 Correct 1 ms 400 KB Output is correct
5 Correct 1 ms 400 KB Output is correct
6 Correct 72 ms 400 KB Output is correct
7 Correct 74 ms 400 KB Output is correct
8 Correct 71 ms 400 KB Output is correct
9 Correct 41 ms 400 KB Output is correct
10 Correct 95 ms 400 KB Output is correct
11 Correct 83 ms 400 KB Output is correct
12 Correct 86 ms 400 KB Output is correct
13 Correct 34 ms 400 KB Output is correct
14 Correct 36 ms 400 KB Output is correct
15 Correct 102 ms 400 KB Output is correct
16 Correct 91 ms 400 KB Output is correct
17 Correct 89 ms 400 KB Output is correct
18 Correct 34 ms 416 KB Output is correct
19 Correct 92 ms 424 KB Output is correct
20 Correct 46 ms 400 KB Output is correct
21 Runtime error 1 ms 200 KB Execution killed with signal 13
22 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 4128 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -