제출 #602256

#제출 시각아이디문제언어결과실행 시간메모리
602256SlavicG레지스터 (IOI21_registers)C++17
0 / 100
0 ms212 KiB
#include "registers.h" #include "bits/stdc++.h" using namespace std; void mini(int a, int b, int k) { append_not(3, b); append_add(3, 3, a); append_and(3, 3, 98); append_and(4, 4, 69); for(int i = k; i >= 1; --i) { append_right(3, 3, 1); append_or(4, 4, 3); } append_and(b, b, 4); append_not(4, 4); append_and(a, a, 4); append_or(a, a, b); } void construct_instructions(int s, int n, int k, int q) { if(s == 0) { vector<bool> P(2000, 0), paiu(2000, 0); for(int i = 0; i < k; ++i) P[i] = 1; paiu[k] = 1; append_store(99, P); append_store(98, paiu); if(k == 1) { append_move(1, 0); append_right(1, 1, 1); append_and(0, 0, 1); return; } append_move(1, 0); append_and(1, 1, 99); for(int i = 1; i < n; ++i) { append_right(2, 0, k * i); append_and(2, 2, 99); mini(1, 2, k); } append_move(0, 1); } }
#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...