이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll,ll> P;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef tuple<ll,ll,ll> PP;
typedef vector<PP> vpp;
typedef vector<vpp> vvpp;
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 pb emplace_back
#define all(a) a.begin(),a.end()
#define dupli(a) {sort(all(a));a.erase(unique(all(a)),a.end());}
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define fi first
#define se second
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
const ll inf=1001001001001001001;
void construct_instructions(int s, int n, int k, int q) {
ll lg=0;
while(n>(1<<lg))lg++;
vb tmp(2000,false);
REP(i,n*k,2000)tmp[i]=true;
append_store(1,tmp);
append_or(0,0,1);
if(s==0){
rep(i,lg){
append_right(1,0,k<<i);
append_xor(2,0,1);
rep(j,k){
append_right(4,0,j);
append_right(5,2,j);
append_xor(6,3,4);
append_and(6,6,5);
append_xor(3,3,6);
}
rep(i,2000){
if(i%k==0)tmp[i]=true;
else tmp[i]=false;
}
append_store(4,tmp);
append_and(3,3,4);
rep(j,k-1){
append_left(4,3,1);
append_or(3,3,4);
}
append_and(2,2,3);
append_xor(0,0,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... |