제출 #437776

#제출 시각아이디문제언어결과실행 시간메모리
437776CodePlatina레지스터 (IOI21_registers)C++17
58 / 100
2 ms204 KiB
#include "registers.h" #include <vector> #include <algorithm> #include <tuple> #define pii pair<int, int> #define piii pair<int, pii> #define ff first #define ss second #define ee ss.ff #define rr ss.ss using namespace std; int cnt = 2; void construct_instructions(int s, int n, int k, int q) { int arr = 0; int one = 1; append_store(one, vector<bool>(2000, true)); for(int i = k - 1; i >= 1; --i) { vector<bool> tmp(2000, false); for(int j = 0; j < n; ++j) tmp[j * k + i] = true; int msk = cnt++; int msk2 = cnt++; append_store(msk2, tmp); append_and(msk, msk2, arr); append_xor(msk2, msk, msk2); append_add(msk2, msk2, one); append_right(msk2, msk2, 1999); append_add(msk2, one, msk2); append_and(msk, msk, msk2); append_and(msk, arr, msk); int pt = 1; while(i + 1 >= pt * 2) { append_right(msk2, msk, pt); append_or(msk, msk2, msk); pt *= 2; } if(i + 1 - pt) { append_right(msk2, msk, i + 1 - pt); append_or(msk, msk2, msk); } append_or(arr, arr, msk); cnt = 2; } while(n > 1) { append_right(1, 0, (n / 2) * k); append_and(0, 0, 1); n = (n + 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...