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