Submission #1232695

#TimeUsernameProblemLanguageResultExecution timeMemory
1232695TimoshBit Shift Registers (IOI21_registers)C++20
0 / 100
0 ms328 KiB
#include "bits/stdc++.h"
#include "registers.h"

using namespace std;

void construct_instructions(int s, int n, int k, int q)
{
	for (int i = k - 1; i >= 0; i--)
	{
		vector<bool> v(2000), s(2000);
		for (int j = 0; j < n; j++)
			v[j * k + i] = 1;
		s[i] = 1;
		append_store(1, v);
		append_and(1, 0, 1);
		append_move(3, 1);

		append_store(2, s);
		append_and(2, 1, 2);
		for (int j = 1; j < n; j++)
		{
			append_right(1, 1, k);
			append_and(2, 1, 2);
		}
		append_right(2, 2, i);
		append_left(99, 99, 1);
		append_xor(99, 99, 2);
		append_left(2, 2, i);
		append_and(1, 99, 98);
		append_move(4, 2);
		for (int j = 1; j < n; j++)
		{
			append_left(2, 2, k);
			append_xor(2, 4, 2);
		}
		append_and(3, 2, 3);
		for (int j = 0; j < i; j++)
		{
			append_or(1, 1, 3);
			append_right(3, 3, 1);
		}
		append_or(0, 0, 1);
	}
	append_move(0, 99);
}
#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...