이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "registers.h"
#include<bits/stdc++.h>
using ll = long long;
using namespace std;
#define pll pair <ll,ll>
#define fi first
#define se second
#define MP make_pair
#define sz(a) (ll((a).size()))
#define MASK(i) (1LL<<(i))
#define BIT(mask,i) (((mask) >> (i))&1)
const ll b = 2000;
void construct_instructions(int s, int n, int k, int q) {
{
vector <bool> tmp(2000);
for (ll j = 0;j < k;j ++)tmp[j] = 1;
append_store(1,tmp);
}
for (ll i = 0;i < n;i ++){
for (ll j = i + 1;j < n;j ++){
// paste number and delete
append_left(2,1,i*k);
append_not(99,2);
append_and(2,0,2);
append_and(0,0,99);
append_left(3,1,j*k);
append_not(99,3);
append_and(3,0,3);
append_and(0,0,99);
// get numbers
append_right(4,2,i*k);
append_right(5,3,j*k);
append_not(5,5);
// a[i] <= a[j] ???
append_add(6,4,5);
append_right(6,6,2000-k);
// do sth??
append_not(5,5);
append_print(4);
append_print(5);
append_print(6);
append_print(0);
append_left(7,6,i*k);
append_left(8,6,j*k);
append_left(9,2,(j-i)*k);
append_right(10,3,(j-i)*k);
append_print(7);
append_print(8);
// 2 or 10, 3 or 9
append_and(2,2,7);
append_not(7,7);
append_and(10,10,7);
append_not(7,7);
append_add(2,2,10);
append_print(2);
append_add(0,0,2);
append_and(3,3,8);
append_not(8,8);
append_and(9,9,8);
append_not(8,8);
append_add(3,3,9);
append_print(3);
append_add(0,0,3);
}
}
// append_move(1, 0);
// append_right(1, 1, 1);
// append_and(0, 0, 1);
}
# | 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... |