제출 #1207917

#제출 시각아이디문제언어결과실행 시간메모리
1207917simona1230Bit Shift Registers (IOI21_registers)C++20
21 / 100
1 ms748 KiB
#include "registers.h" #include <bits/stdc++.h> using namespace std; int nn,kk; void compare(int f,int s,int mn,int mx) { append_print(f); append_print(s); for(int i=1; i<nn; i++) { append_xor(2,f,s); append_and(3,f,2); append_not(4,2); for(int j=0; j<kk; j++) { if(j)append_left(5,5,1); append_and(5,5,4); append_or(5,5,3); } append_and(5,5,50); append_right(5,5,kk-1); append_add(5,5,51); append_print(5); append_not(6,5); append_and(7,5,f); append_and(8,6,s); append_or(mn,7,8); if(mx!=-1) { append_and(7,5,s); append_and(8,6,f); append_or(mx,7,8); } } } void construct_instructions(int s, int n, int k, int q) { vector<bool> v(2000); v[k-1]=1; append_store(50,v); for(int i=0; i<k; i++) v[i]=1; append_store(51,v); nn=n; kk=k; if(s==0) { int c=0; for(int i=1;i<n;i++) { append_right(1,0,i*k); int h=9; if(i==n-1)h=0; compare(c,1,h,-1); c=h; } } } // 0 2 2 1000
#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...