#include "registers.h"
#include<bits/stdc++.h>
using namespace std;
const int LIM = 2000;
int s, n, k, q;
namespace sub1{
void get_bit(int t, int i){
if(i == 3){
append_right(t, 0, 3);
return;
}
append_left(t, 0, LIM - i - 1);
append_right(t, t, LIM - i - 1);
}
void solve(){
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;
}
get_bit(1, 0);
get_bit(2, 1);
get_bit(3, 2);
get_bit(4, 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(3, 3, 7);
append_and(4, 4, 7);
append_not(6, 6);
append_and(2, 2, 6);
append_and(1, 1, 6);
append_left(2, 2, 1);
append_left(4, 4, 1);
append_move(0, 1);
append_add(0, 0, 2);
append_add(0, 0, 3);
append_add(0, 0, 4);
}
}
void construct_instructions(int _s, int _n, int _k, int _q){
n = _n;
s = _s;
k = _k;
q = _q;
if(s == 0 && n == 2 && k <= 2 && q == 1000){
sub1::solve();
}
}
# | 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... |