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"
using namespace std;
#include <vector>
#include <iostream>
#define B 2000
void construct_instructions(int s, int n, int k, int q) {
if (s==1){return;}
vector<bool> v;
vector<bool> blank;
//seperate numbers
v.resize(B,0);
blank=v;
for (int i=0;i<k;i++){v[i]=1;}
append_store(n+1,v);
for (int i=0;i<n;i++){
append_move(i+1,0);
if (i!=0){
append_right(i+1,i+1,i*k);
}
if (i!=n-1){
append_and(i+1,i+1,n+1);
}
}
append_and(0,1,2);
if (k==1){return;}
append_right(3,0,1);
v=blank;
v[0]=1;
append_store(4,v);
append_add(3,3,4);
append_left(4,4,1);
append_and(5,4,1);
append_right(5,5,1);
append_and(5,5,3);
append_or(1,1,5);
append_and(5,4,2);
append_right(5,5,1);
append_and(5,5,3);
append_or(2,2,5);
append_and(0,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... |