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 ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<bool> vb;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++)
#define all(a) a.begin(),a.end()
#define fi first
#define se second
#define pb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
const ll inf=1001001001001001001;
void construct_instructions(int s, int n, int k, int q) {
rep(j,2){
vector<bool> v;
rep(i,2000){
if(i/k%2==j)v.pb(1);
else v.pb(0);
}
append_store(99-j,v);
}
rep(j,4){
vector<bool> v;
rep(i,2000){
if(k-i%k-1>=(1<<j))v.pb(1);
else v.pb(0);
}
append_store(97-j,v);
}
{
vector<bool> v;
rep(i,2000){
if(i%k==0)v.pb(1);
else v.pb(0);
}
append_store(93,v);
}
append_left(0,0,k);
{
vector<bool> v;
rep(i,2000){
if(i>=(n+1)*k)v.pb(1);
else v.pb(0);
}
append_store(92,v);
}
append_or(0,0,92);
// return;
rep(c,n){
if(c==50)append_or(0,0,92);
append_left(1,0,k);
append_and(1,1,99-c%2);
append_right(2,0,k);
append_and(2,2,98+c%2);
append_or(1,1,2);
append_xor(2,0,1);
{
append_right(3,2,1);
append_and(3,3,97);
}
rep(i,4){
append_right(4,3,1<<i);
append_and(4,4,97-i);
append_or(3,3,4);
}
append_add(3,3,93);
append_and(3,0,3);
rep(i,4){
append_right(4,3,1<<i);
append_and(4,4,97-i);
append_or(3,3,4);
}
append_and(2,2,3);
append_and(3,0,98+c%2);
append_and(4,1,99-c%2);
append_or(3,3,4);
append_xor(0,2,3);
}
append_right(0,0,k);
}
# | 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... |