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) {
int x = 1;
while(x<n){
int p = k*x;
vector<bool> v(2000), v2(2000);
for(int i = 0; i<2000; i++){
v[i] = (i/p)%2;
v2[i] = v[i]&&(i%p==1);
}
append_store(99,v);
append_store(98,v2);
//bitmasking
append_move(1,0);
append_and(1,99,1);
append_right(1,1,p);
append_not(99,99);
append_and(0,99,0);
//min finding
append_not(2,1);
append_add(2,2,98);
append_add(2,0,2);
append_right(2,2,p);
append_and(0,0,2);
append_not(2,2);
append_and(1,1,2);
append_or(0,0,1);
x*=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... |