이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "registers.h"
#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::vector;
using std::string;
using std::endl;
using ll = long long;
using vi = vector<ll>;
using vii = vector<vi>;
using pii = std::pair<ll,ll>;
#define rep(i,j,k) for(ll i=ll(j); i<ll(k); i++)
#define REP(i,j,k) for(ll i=ll(j); i<=ll(k); i++)
#define per(i,j,k) for(ll i=ll(j); i>=ll(k); i--)
#define ln "\n"
#define all(a) a.begin(), a.end()
#define pb emplace_back
#define mp std::make_pair
constexpr ll inf = (1ll<<60);
void construct_instructions(int s, int n, int k, int q) {
constexpr ll base = 90;
constexpr ll mb = 2000;
{
vector<bool> v(mb);
rep(i,1,mb){
if(i%k == 0) v[i] = 1;
}
append_store(base,v);
}
while(n > 1){
ll half = n/2;
append_left(1, 0, half*k);
append_not(2,1);
append_add(3,0,2);
append_xor(4,0,1);
append_xor(5,3,4);
append_and(6,base,5);
append_left(7,6,2);
append_or(6,6,7);
append_left(7,6,4);
append_or(6,6,7);
append_left(7,6,2);
append_or(6,6,7);
append_left(7,6,1);
append_or(6,6,7);
append_left(6,6,1);
append_or(7,1,6);
append_not(6,6);
append_or(8,0,6);
append_or(0,7,8);
n = (n+1)/2;
}
}
# | 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... |