제출 #815998

#제출 시각아이디문제언어결과실행 시간메모리
815998blackyuki레지스터 (IOI21_registers)C++17
35 / 100
3 ms628 KiB
#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(1,v); } append_or(0,0,1); rep(c,n){ 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...