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;
typedef long long int lld;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define trav(a,v) for(auto a:v)
vector<bool> b;
void construct_instructions(int s, int n, int k, int q) {
b.resize(2000);
rep(i,1,k+1){
rep(j,0,2000)b[j]=false;
for(int j=i-1;j<2000;j+=k){
b[j]=true;
}
append_store(i,b);
}
rep(j,0,2000)b[j]=true;
append_store(k+1,b);
rep(j,0,2000)b[j]=false;
rep(i,0,n)b[k-1+i*k]=true;
append_store(k+2,b);
//append_print(k+2);
for(int i=k;i>0;i--){
append_and(k+3,k+2,0);
append_xor(k+3,i,k+3);
append_and(k+3,k+3,k+2);
append_move(k+4,k+3);
//append_print(k+3);
append_add(k+3,k+1,k+3);
append_right(k+3,k+3,1999);
append_add(k+3,k+3,k+1);
append_not(k+3,k+3);
append_or(k+4,k+3,k+4);
append_and(k+4,k+2,k+4);
//append_print(k+4);
append_move(k+2,k+4);
if(i>1)append_right(k+2,k+2,1);
}
//append_print(k+2);
rep(i,0,k){
append_and(k+5+i,k+2,0);
append_print(k+5+i);
append_add(k+5+i,k+1,k+5+i);
append_right(k+5+i,k+5+i,1999);
append_left(k+5+i,k+5+i,i);
append_left(k+2,k+2,1);
}
append_or(0,0,k+1);
rep(i,0,k){
append_xor(0,0,k+5+i);
}
//append_print(0);
}
# | 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... |