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 "registers.h"
using namespace std;
using lint = long long;
using pi = pair<int, int>;
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
void construct_instructions(int s, int n, int k, int q) {
{
vector<bool> vect(2000);
fill(vect.begin(), vect.begin() + k, 1);
append_store(98, vect);
fill(all(vect), 0);
vect[0] = 1;
append_store(97, vect);
append_and(99, 98, 0);
}
auto Swap = [&](int a, int b){
append_xor(10, a, b);
append_not(11, b);
append_add(11, 11, 97);
append_add(11, 11, a);
append_right(11, 11, 1000);
append_and(10, 10, 11);
append_xor(b, b, 10);
};
for(int i = 1; i < n; i++){
// 1 vs 99
append_right(1, 0, i * k);
append_and(1, 1, 98);
Swap(1, 99);
}
append_right(0, 99, 0);
}
# | 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... |