이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
 
const int B = 2000;
void construct_instructions(int S, int N, int K, int Q) 
{ 
	{
		vector<bool> tmp(B);
		fill(tmp.begin()+N*K, tmp.end(), true);
		append_store(1, tmp);
		append_or(0, 0, 1);
	}
 
	int L = 8*sizeof(N) - __builtin_clz(N-1);
	N = (1 << L);
 
	const int K_MSK_OFF = 90;
	for (int p = 0; p < L; p++) {
		vector<bool> tmp(B);
		tmp[0] = true;
		for (int i = 0; (i+1)*K < B; i ++) tmp[(i+1)*K] = !((i >> p) & 1);
		append_store(K_MSK_OFF+p, tmp);
	}
	for (int z = 0; z < L; z++) {
		for (int p = z; p >= 0; p--) {
			append_right(1, 0, (1 << p) * K);
			append_xor(2, 0, 1);
			append_not(3, 0);
			append_add(3, 3, 1);
			append_xor(3, 3, 2);
			if (z+1 < L) {
				append_xor(3, 3, K_MSK_OFF + z+1);
				append_not(3, 3);
			}
			append_and(3, 3, K_MSK_OFF + p);
			append_right(4, 3, K);
			append_not(4, 4);
			append_add(3, 3, 4);
			append_and(2, 2, 3);
			append_xor(0, 0, 2);
			append_left(2, 2, (1 << p) * K);
			append_xor(0, 0, 2);
		}
	}
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |