이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "registers.h"
void construct_instructions(int s, int n, int k, int q) {
append_right(1, 0, 2);//ustaw b
append_left(0, 0, 2000-2), append_right(0,0,2000-2);//ustaw a
append_right(10, 0, 1);//10 a>>1
append_right(11, 1, 1);//11 b>>1
append_and(2, 10, 1); //((a>>1)&b)
append_and(3, 11, 0); //((b>>1)&a)
append_or(2, 2, 3);// pom
append_not(4, 1);
append_and(3, 0, 10), append_and(3, 3, 11), append_and(3, 3, 4);//(a&(a>>1)&(b^11)&((b>>1)))
append_not(6, 0);
append_and(4, 1, 11), append_and(4, 4, 10), append_and(4, 4, 6);//(b&(b>>1)&(a^11)&((a>>1))
append_or(3, 3, 4);//pom1
append_xor(2, 2, 3);//pom1^pom
append_and(3, 0, 1);//a&b
append_or(0, 2, 3);
return;/*
int pom = ((a>>1)&(b))|((a)&(b>>1));
int pom1 = (a&(a>>1)&(b^11)&((b>>1))) | (b&(b>>1)&(a^11)&((a>>1)));
printf("pom1:%d\n", pom1);
return (a&b) | (pom^pom1) ;
append_move(1, 0);
append_right(1, 1, 1);
append_and(0, 0, 1);*/
}
# | 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... |