Submission #621226

#TimeUsernameProblemLanguageResultExecution timeMemory
621226amunduzbaevBit Shift Registers (IOI21_registers)C++17
21 / 100
1 ms340 KiB
#include "registers.h" #include "bits/stdc++.h" using namespace std; #ifndef EVAL #include "grader.cpp" #endif const int M = 100; void upd(int i, int j, int p){ append_and(M - 1, i, j); append_right(M - 1, M - 1, p); append_move(M - 2, M - 1); for(int k=1;k<p;k++){ append_left(M - 2, M - 2, 1); append_or(M - 2, M - 2, M - 1); } } void construct_instructions(int s, int n, int k, int q) { if(s) assert(false); append_move(1, 0); append_right(2, 0, k); for(int i=k-1;~i;i--){ append_xor(3, 1, 2); if(i){ append_right(3, 3, i); append_left(3, 3, i); } append_or(4, 4, 3); if(i){ upd(1, 3, i); append_or(1, 1, M - 2); upd(2, 3, i); append_or(2, 2, M - 2); } } append_or(3, 1, 2); append_not(4, 4); append_and(4, 4, 3); append_move(0, 4); } /* 0 2 2 1000 1 2 */
#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...