#include "registers.h"
#include<bits/stdc++.h>
using namespace std;
const int LIM = 2000;
void construct_instructions(int s, int n, int k, int q){
if(s == 0 && n == 2 && k <= 2){
if(k == 1){
append_right(1, 0, 1);
append_left(0, 0, LIM - 1);
append_right(0, 0, LIM - 1);
append_and(0, 0, 1);
return;
}
auto get_bit = [&] (int destination, int from, int i){
append_left(destination, from, LIM - i - 1);
append_right(destination, destination, LIM - 1);
};
if(q == 1000){
get_bit(3, 0, 0);
get_bit(1, 0, 1);
get_bit(4, 0, 2);
append_right(2, 0, 3);
append_xor(5, 1, 2);
append_not(5, 5);
append_not(6, 2);
append_and(6, 1, 6);
append_not(7, 4);
append_and(7, 3, 7);
append_and(7, 5, 7);
append_or(6, 7, 6);
append_and(2, 2, 6);
append_and(4, 4, 6);
append_not(6, 6);
append_and(1, 1, 6);
append_and(3, 3, 6);
append_left(0, 1, 1);
append_left(2, 2, 1);
append_add(0, 0, 2);
append_add(0, 0, 3);
append_add(0, 0, 4);
}
else{
get_bit(1, 0, 0);
get_bit(2, 0, 1);
get_bit(3, 0, 2);
append_right(4, 0, 3);
append_and(5, 2, 4);
append_xor(2, 5, 2);
append_or(1, 1, 2);
append_xor(4, 5, 4);
append_or(3, 3, 4);
append_and(0, 1, 3);
append_left(5, 5, 1);
append_add(0, 0, 5);
}
}
else if(s == 0){
if(q == 4000){
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |