이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "registers.h"
int n, k;
void compare(int x, int y) {
append_not(3, y);
append_or(4, x, 3);
append_and(5, x, 3);
for (int i = 0; i < k; i++) {
append_and(6, 6, 4);
append_or(6, 6, 5);
append_right(4, 4, 1);
append_right(5, 5, 1);
}
append_left(6, 6, 1999);
append_right(6, 6, 1999);
for (int i = 1; i < k; i++) {
append_left(7, 6, i);
append_or(6, 6, 7);
}
append_and(8, x, 6);
append_xor(y, y, 8);
append_and(8, y, 6);
append_xor(x, x, 8);
append_and(8, x, 6);
append_xor(y, y, 8);
}
void construct_instructions(int s, int n, int k, int q) {
::n = n, ::k = k;
append_left(1, 0, 2000 - k);
append_right(1, 1, 2000 - k);
for (int i = 1; i < n; i++) {
append_left(2, 0, 2000 - k * (i + 1));
append_right(2, 2, 2000 - k);
compare(1, 2);
}
append_move(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... |