이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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);
append_right(ind,x,bit);
flip(ind);
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);
is0(0,4,1,0);
is0(0,4,0,1);
flip(4);
is0(1,5,1,0);
is0(1,5,0,1);
flip(5);
append_and(3,3,4);
append_and(3,3,5);
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... |