Submission #439280

#TimeUsernameProblemLanguageResultExecution timeMemory
439280rainboy레지스터 (IOI21_registers)C++17
33 / 100
1 ms332 KiB
#include "registers.h" #include <vector> using namespace std; typedef vector<bool> vb; const int N = 128, L = 7, B = 2000; void construct_instructions(int s, int n, int k, int q) { if (s == 0) { vb aa(B), bit(B); int h, i, l; for (i = n; i < N; i++) aa[i * k + k - 1] = 1; bit[k - 1] = 1; append_store(1, aa), append_store(99, bit); for (h = k - 1; h >= 0; h--) { append_or(2, 0, 1), append_right(3, 2, k); append_and(3, 3, 2); if (n > 2) for (l = 1; l < L; l++) append_right(4, 3, k << l), append_and(3, 3, 4); append_and(3, 3, 99); append_or(5, 5, 3); if (h > 0) { for (l = 0; l < L; l++) if (l == 0 || n > 2) append_left(4, 3, k << l), append_or(3, 3, 4); append_not(3, 3), append_and(2, 2, 3), append_or(1, 1, 2); append_right(1, 1, 1), append_right(99, 99, 1); } } append_move(0, 5); } else { } }
#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...