이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
const int b=2000;
int k;
void minimize(int d){
append_right(1,0,d);
append_and(0,0,96);
append_and(1,1,96);
append_not(2,1);
append_add(2,0,2);
append_right(2,2,k);
append_not(3,2);
append_and(4,2,1);
append_and(5,3,0);
append_and(2,2,0);
append_and(3,3,1);
append_or(0,2,3);
append_or(1,4,5);
}
void construct_instructions(int s, int n, int k, int q){
::k=k;
vector <bool> ve(b,0);
for (int i=n*k;i<b;i++)
ve[i]=1;
append_store(97,ve);
append_or(0,0,97);
for (int i=0;i<b;i++)
ve[i]=(i%(k*2)<k);
append_store(96,ve);
int x=1;
while (x<n)
x*=2;
n=x;
if (!s){
int d=k;
while (x>1){
minimize(d);
x/=2;
d*=2;
}
return;
}
for (int i=0;i<=n;i++){
if (i&1){
append_left(6,0,b-k);
append_right(6,6,b-k);
append_right(0,0,k);
}
minimize(k);
append_and(0,0,96);
append_and(1,1,96);
append_left(1,1,k);
append_or(0,0,1);
if (i&1){
append_left(0,0,k);
append_or(0,0,6);
}
}
}
# | 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... |