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;
void construct_instructions(int s, int n, int k, int q) {
//only seperate when needed to save space
vector<bool> v(2000);
v[0] = 1;
append_store(98,v);
for(int i = 0; i<k; i++) v[i] = 1;
append_store(99,v);
append_move(1,99);
//result is in register 1
for(int i = 0; i<n; i++){
append_move(2,0);
append_right(2,2,i*k);
append_and(2,2,99);
append_move(8,99);
append_left(8,8,i*k);
//compute the min
append_not(3,1);
append_add(3,3,98);
append_add(3,3,2);
append_right(3,3,k);
append_and(1,1,3);
append_not(3,3);
append_and(3,3,2);
append_or(1,1,3);
}
append_move(1,0);
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... |