Submission #1022908

#TimeUsernameProblemLanguageResultExecution timeMemory
1022908NeroZeinBit Shift Registers (IOI21_registers)C++17
21 / 100
1 ms348 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); } else { append_move(1, 0); append_move(2, 0); append_right(2, 2, 2); append_and(3, 1, 2);//this contains the result of a[0] & a[1] //append_print(3); append_or(7, 1, 2); vector<bool> v(b, 0); v[0] = 1; append_store(8, v); append_and(7, 7, 8);//this contains the result of a[0][0] | a[1][0]; //append_print(7); append_move(4, 0); append_right(4, 4, 1); append_xor(4, 0, 4); for (int i = 0; i < b; ++i) { v[i] = 1; } v[1] = 1; append_store(8, v); append_and(4, 4, 8); append_move(5, 4); append_right(5, 5, 2); append_and(6, 4, 5);//this now contains (a[0][0] ^ a[0][1]) & (a[1][0] ^ a[1][1]) //append_print(6); append_and(7, 6, 7); append_or(3, 3, 7); //append_print(7); //append_print(3); append_move(0, 3); } }
#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...