# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
439442 | haojiandan | Bit Shift Registers (IOI21_registers) | C++17 | 2 ms | 620 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"
#include <bits/stdc++.h>
using namespace std;
void construct_instructions(int s, int n, int k, int q) {
int m=100,b=2000;
vector<bool> A(b,0);
for (int i=n*k;i<b;i++) A[i]=1; append_store(99,A);
int r1=98,r2=97,A0=96,A1=95;
for (int i=0;i<b;i++) if ((i/k)%2==0) A[i]=1; else A[i]=0;
append_store(r1,A);
for (int i=0;i<b;i++) if (i%(k*2)==0) A[i]=1; else A[i]=0;
append_store(r2,A);
if (s==0) {
append_or(0,0,99);
int a=1;
while (a<n) {
append_right(1,0,a*k);
a*=2;
append_not(2,1);
append_and(2,2,r1);
append_and(0,0,r1);
append_add(3,0,2);
append_right(3,3,k);
append_and(3,3,r2);
append_add(3,3,r1);
append_and(A0,3,0);
append_not(3,3);
append_and(A1,3,1);
Compilation message (stderr)
# | 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... |