Submission #631006

#TimeUsernameProblemLanguageResultExecution timeMemory
631006qwerasdfzxcl레지스터 (IOI21_registers)C++17
58 / 100
1 ms340 KiB
#include "registers.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; void init0(int n, int k){ vector<bool> V(2000, 0); for (int i=k*n;i<2000;i++) V[i] = 1; append_store(71, V); for (int z=1;z<=(n==2?1:7);z++){ fill(V.begin(), V.end(), 0); for (int i=0;i<128;i++) if (i%(1<<z)==0){ for (int j=i*k;j<(i+1)*k;j++) V[j] = 1; } append_store(90+z, V); append_not(80+z, 90+z); } } void copy_bit(int t, int k){ ++k; int len = 1; while(len<k){ if (len*2 <= k) append_right(61, t, len); else append_right(61, t, k-len); append_or(t, t, 61); len *= 2; } } void solve0(int n, int k){ init0(n, k); append_or(0, 0, 71); for (int z=0;z<(n==2?1:7);z++){ append_right(1, 0, k*(1<<z)); if (z==0){append_and(0, 0, 91); append_and(1, 1, 91);} append_xor(2, 0, 1); append_xor(1, 1, 90+z+1); append_add(1, 0, 1); append_and(1, 1, 80+z+1); copy_bit(1, k); append_and(1, 1, 2); append_xor(0, 0, 1); append_and(0, 0, 90+z+1); } } void construct_instructions(int s, int n, int k, int q) { if (s==0) solve0(n, 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...