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 "bits/stdc++.h"
using namespace std;
#ifndef EVAL
#include "grader.cpp"
#endif
const int M = 100;
void upd(int i, int j, int p){
append_and(M - 1, i, j);
append_right(M - 1, M - 1, p);
append_move(M - 2, M - 1);
for(int k=1;k<p;k++){
append_left(M - 2, M - 2, 1);
append_or(M - 2, M - 2, M - 1);
}
}
void construct_instructions(int s, int n, int k, int q) {
if(s) assert(false);
append_move(1, 0);
append_right(2, 0, k);
for(int i=k-1;~i;i--){
append_xor(3, 1, 2);
if(i){
append_right(3, 3, i);
append_left(3, 3, i);
}
append_or(4, 4, 3);
if(i){
upd(1, 3, i);
append_or(1, 1, M - 2);
upd(2, 3, i);
append_or(2, 2, M - 2);
}
}
append_or(3, 1, 2);
append_not(4, 4);
append_and(4, 4, 3);
append_move(0, 4);
}
/*
0 2 2 1000
1 2
*/
# | 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... |