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<iostream>
#include<algorithm>
using namespace std;
int ind=6,b=2000,r=2;
void flip(int x) {
append_not(x,x);
//append_left(x,x,b-1);
//append_right(x,x,b-1);
}
void is0(int x,int y,int bit,int op) {
//append_left(ind,x,b-1-bit);
if(bit) append_right(ind,x,bit);
flip(ind);
if(op) append_and(y,y,ind);
else append_or(y,y,ind);
ind+=1;
}
void not0(int x,int y,int bit,int op) {
//append_left(ind,x,b-1-bit);
if(bit) append_right(ind,x,bit);
if(op) append_and(y,y,ind);
else append_or(y,y,ind);
ind+=1;
}
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;
}
append_move(1,0);
append_right(1,1,2);
append_and(2,0,1);
// 3 4 5
is0(2,3,1,0);
is0(2,3,0,1);
not0(0,4,1,0);
not0(0,4,0,0);
not0(1,5,1,0);
not0(1,5,0,0);
append_and(3,3,4);
append_and(3,3,5);
//append_left(3,3,b-1);
//append_right(3,3,b-1);
append_add(2,2,3);
append_move(0,2);
return;
}
# | 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... |