답안 #666207

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
666207 2022-11-27T19:12:50 Z rainboy Shopping (JOI21_shopping) C++17
0 / 100
2 ms 4100 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);
}

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) { }
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 400 KB Output is correct
2 Correct 1 ms 408 KB Output is correct
3 Correct 0 ms 400 KB Output is correct
4 Incorrect 1 ms 200 KB Wrong Answer [2]
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 400 KB Output is correct
2 Correct 1 ms 408 KB Output is correct
3 Correct 0 ms 400 KB Output is correct
4 Incorrect 1 ms 200 KB Wrong Answer [2]
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 4100 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -