Submission #616075

# Submission time Handle Problem Language Result Execution time Memory
616075 2022-07-31T20:01:29 Z Clan328 Bit Shift Registers (IOI21_registers) C++17
21 / 100
1 ms 212 KB
#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 time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -