# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
442220 | daniel920712 | 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 "registers.h"
#include <vector>
using namespace std;
void construct_instructions(int s, int n, int k, int q)
{
int i,j;
if(k==1)
{
append_move(1,0);
append_right(1,1,1);
append_and(0,0,1);
}
else
{
append_move(1,0);
append_right(1,1,2);
append_and(0,0,1);
append_xor(2,0,1);
append_right(2,2,1);
append_left(2,2,1999);
append_right(2,2,1999);
append_and(3,0,1);
append_move(4,0);
append_move(5,1);
append_right(4,4,1);
append_not(7,2);
append_and(6,1,0);
append_and(6,6,7);
append_and(8,4,0);
appand_not(10,4);
append_and(9,10,1);
append_or(11,8,9);
append_and(11,2,11);
append_or(11,11,6);
append_right(3,1);
append_left(3,1);
append_left(11,11,1999);
append_right(11,11,1999);
append_add(0,3,11);
}
}