제출 #616075

#제출 시각아이디문제언어결과실행 시간메모리
616075Clan328레지스터 (IOI21_registers)C++17
21 / 100
1 ms212 KiB
#include <bits/stdc++.h>
#include "registers.h"

using namespace std;

// void append_move(int t, int x);
// void append_store(int t, std::vector<bool> v);
// void append_and(int t, int x, int y);
// void append_or(int t, int x, int y);
// void append_xor(int t, int x, int y);
// void append_not(int t, int x);
// void append_left(int t, int x, int s);
// void append_right(int t, int x, int s);
// void append_add(int t, int x, int y);
// void append_print(int t);

void construct_instructions(int s, int n, int k, int q) {
	append_move(1, 0);
	append_move(2, 0);
	append_right(2, 2, k);
	append_and(0, 1, 2);

	if (k > 1) {
		append_xor(3, 1, 2);
		append_right(3, 3, k-1);

		// append_or(4, 1, 2);
		// append_left(4, 4, 1999);
		// append_right(4, 4, 1999);

		append_move(6, 1);
		append_move(7, 1);
		append_right(7, 7, 1);
		append_xor(6, 6, 7);

		append_move(7, 2);
		append_move(8, 2);
		append_right(8, 8, 1);
		append_xor(7, 7, 8);

		append_and(6, 6, 7);
		append_left(6, 6, 1999);
		append_right(6, 6, 1999);
		// append_print(6);
		
		append_and(5, 3, 6);

		// append_print(5);
		// append_left(5, 5, k-1);

		append_or(0, 5, 0);
	}

	return;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...