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 <bits/stdc++.h>
#include "registers.h"
using namespace std;
using ll = long long;
ll n, m, q, k, x, y, a, b, c;
void construct_instructions(int s, int n, int k, int q) {
vector<bool> v(2000);
v[0] = 1;
append_store(99, v);
for (int i = 1; i < k; i++) {
v[i] = 1;
}
append_store(98, v);
append_and(1, 0, 98);
for (int j = 1; j < n; j++) {
append_right(2, 0, j * k);
append_and(2, 2, 98);
append_not(3, 2);
append_add(3, 3, 99);
append_add(3, 3, 1);
append_right(3, 3, 1999);
ll cnt = 1;
for (ll i = 1; cnt < k; i *= 2) {
append_left(97, 3, min(k - cnt, i));
append_or(3, 97, 3);
cnt += min(k - cnt, i);
}
// append_print(3);
append_not(4, 3);
append_and(3, 3, 1);
append_and(4, 4, 2);
append_move(1, 3);
append_add(1, 1, 4);
}
append_move(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... |