Submission #601278

#TimeUsernameProblemLanguageResultExecution timeMemory
601278PiejanVDCBit Shift Registers (IOI21_registers)C++17
0 / 100
1 ms340 KiB
#include "registers.h" #include <bits/stdc++.h> using namespace std; const int b = 2000; void construct_instructions(int s, int n, int k, int q) { if(k == 1) { append_move(1, 0); append_right(1, 1, 1); append_and(0, 0, 1); return; } append_move(1, 0); append_right(1, 1, 2); for(int i = 3 ; i >= 0 ; i--) { vector<bool>v(b, 0); for(int j = 0 ; j < 2 ; j++) v[j] = i & (1 << j); append_store(2, v); append_xor(2, 0, 2); for(int j = 0 ; j < 2 ; j++) { v.clear(); v.resize(b, 0); v[j] = 1; append_store(3, v); append_and(3, 2, 3); append_right(3, 3, i); for(int l = 0 ; l < 2 ; l++) { append_and(5, 2, 3); append_or(4, 4, 5); append_left(3, 3, 1); } append_not(6, 4); append_and(10, 10, 6); append_and(11, 4, 0); append_or(10, 11, 10); } v.clear(); v.resize(b, 0); for(int j = 0 ; j < 2 ; j++) v[j] = i & (1 << j); append_store(2, v); append_xor(2, 1, 2); for(int j = 0 ; j < 2 ; j++) { v.clear(); v.resize(b, 0); v[j] = 1; append_store(3, v); append_and(3, 2, 3); append_right(3, 3, i); for(int l = 0 ; l < 4 ; l++) { append_and(5, 2, 3); append_or(4, 4, 5); append_left(3, 3, 1); } append_not(6, 4); append_and(10, 10, 6); append_and(11, 4, 1); append_or(10, 11, 10); } } append_move(0, 10); }
#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...