Submission #580205

#TimeUsernameProblemLanguageResultExecution timeMemory
580205mosiashvililukaBit Shift Registers (IOI21_registers)C++17
10 / 100
1 ms340 KiB
#include<bits/stdc++.h> #include "registers.h" using namespace std; const int B=1999; int a,b,c,d,e,i,j,ii,jj,zx,xc,tes,t,K; vector <bool> v; void miwuwyne(int q, int w, int rr, int RR){ if(B!=w){ append_left(RR,rr,B-w); append_right(RR,RR,B-w); rr=RR; } if(q!=0){ append_right(RR,rr,q); } } void fil(vector <bool> &q){ while(q.size()<B+1) q.push_back(0); } void leftwuw(int q, int rr, int RR){ if(q==0) return; append_right(RR,rr,q); append_left(RR,RR,q); } void construct_instructions(int Ss, int Nn, int Kk, int Qq) { tes=Qq;a=Nn;K=Kk; for(i=1; i<=a; i++){ //append_move(i,0); c=(i-1)*K;d=i*K-1; miwuwyne(c,d,0,i); } v.clear();v.push_back(1);fil(v); append_store(a+1,v); ii=97; append_move(ii,1); for(i=2; i<=a; i++){ append_not(a+2,i); append_add(a+2,a+2,a+1); append_add(a+2,a+2,ii); leftwuw(K,a+2,a+2); c=a+2; for(j=K-1; j>=0; j--){ c++; append_right(c,c-1,1); } for(j=a+2; j<=c; j++){ if(j==a+2){ append_move(c+1,j); continue; } append_or(c+1,j,c+1); } append_not(c+2,c+1); append_and(c+3,ii,c+1); append_and(c+4,i,c+2); append_xor(ii,c+3,c+4); } append_move(0,ii); }
#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...