# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1068628 | alex_2008 | Bit Shift Registers (IOI21_registers) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "register.h"
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#define ff first
#define ss second
typedef long long ll;
using namespace std;
void construct_instructions(int s, int n, int k, int q) {
if (k == 1) {
append_move(1, 0);
append_right(1, 1, 1);
append_and(0, 0, 1);
return;
}
vector <int> b(2000, 0);
b[0] = 1;
store(1, b);
and (2, 0, 1);
b[0] = 0;
b[1] = 1;
store(3, b);
and (4, 0, 3);
b[1] = 0;
b[2] = 1;
store(5, b);
and (6, 0, 5);
b[2] = 0;
b[3] = 1;
store(7, b);
and (8, 0, 7);
and (9, 4, 8);
not(10, 9);
xor (11, 4, 10);
xor (12, 8, 10);
xor (13, 1, 2);
xor (14, 1, 6);
and (15, 13, 11);
and (16, 14, 12);
or (17, 15, 16);
xor (18, 17, 1);
right(19, 9, 1);
add(0, 19, 18);
}