# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
599756 | idiot123 | Bit Shift Registers (IOI21_registers) | C++17 | 1 ms | 596 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "registers.h"
using namespace std;
const int shift = 2;
const int b = 2000;
const int m = 100;
void construct_instructions(int s, int n, int k, int q) {
//first we need to make space between numbers
if(s == 1){
vector<bool> v(b, false);
//oddReg and evenReg can be used to separate numbers on odd and even positions
int oddReg = 99;
for(int i = 1; i < n; i+=2){
for(int j = k*i; j < k*i + k; j++)v[j] = 1;
}
append_store(oddReg, v);
for(int i = 0; i < b; i++)v[i] = 0;
for(int i = 0; i < n; i+=2){
for(int j = k*i; j < k*(i+1); j++)v[j] = 1;
}
int evenReg = 98;
append_store(evenReg, v);
int aReg = 1; int bReg = 2;
append_and(aReg, evenReg, 0);
append_and(bReg, oddReg, 0);
append_right(bReg, bReg, k);
int evenSwapRange = 96; int oddSwapRange = 97;
append_right(oddReg, oddReg, k);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |