Submission #747551

# Submission time Handle Problem Language Result Execution time Memory
747551 2023-05-24T10:10:29 Z Sharky Bit Shift Registers (IOI21_registers) C++17
21 / 100
1 ms 304 KB
#include <bits/stdc++.h>
#include "registers.h"
using namespace std;

const int B = 2000;
const int ONE = 98;

void construct_instructions(int s, int n, int k, int q) {
	append_right(1, 0, k);
	vector<bool> v(2000, 1);
	for (int i = k; i < B; i++) v[i] = 0;
	append_store(99, v);
	append_and(2, 0, 99);
	if (k == 1) {
		append_and(0, 1, 2);
		return;
	}
	v = vector<bool> (2000, 1);
	for (int i = 1; i < B; i++) v[i] = 0;
	append_store(ONE, v);
	append_right(3, 0, 3);
	append_right(4, 0, 2);
	append_and(4, 4, ONE);
	append_right(5, 0, 1);
	append_and(5, 5, ONE);
	append_and(6, 0, ONE);
	append_and(69, 1, 2);
	append_xor(7, 4, 5);
	append_xor(7, 7, ONE); // r[98] = 1!!!!!!!
	append_xor(8, 3, 6);
	append_xor(8, 8, ONE);
	append_and(7, 7, 8);
	append_xor(9, 3, 4);
	append_and(7, 7, 9);
	append_add(0, 69, 7);
}
# 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 1 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 304 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 -