Submission #1045849

# Submission time Handle Problem Language Result Execution time Memory
1045849 2024-08-06T08:06:41 Z Unforgettablepl Bit Shift Registers (IOI21_registers) C++17
21 / 100
0 ms 348 KB
#include "registers.h"

void construct_instructions(int s, int n, int k, int q) {
	if(k==1){
		append_right(1,0,1);
		append_and(0,0,1);
		return;
	}
	append_right(1,0,2);
	append_and(2,0,1);
	// Edge Case 1
	std::vector<bool> case1(2000);
	case1[1]=true;
	append_store(3,case1);
	append_xor(4,0,3);
	append_right(5,4,1);
	append_and(4,4,5);
	append_right(5,5,2);
	append_and(4,4,5);
	append_or(2,4,2);
	// Edge Case 2
	std::vector<bool> case2(2000);
	case2[3]=true;
	append_store(3,case2);
	append_xor(4,0,3);
	append_right(4,4,1);
	append_right(5,4,1);
	append_and(4,4,5);
	append_right(5,5,1);
	append_and(4,4,5);
	append_or(2,4,2);
	// finish
	append_move(0,2);
	return;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Incorrect sorting
2 Halted 0 ms 0 KB -