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"
#include <vector>
#include <algorithm>
#include <tuple>
#define pii pair<int, int>
#define piii pair<int, pii>
#define ff first
#define ss second
#define ee ss.ff
#define rr ss.ss
using namespace std;
int cnt = 2;
void construct_instructions(int s, int n, int k, int q)
{
int arr = 0;
int one = 1;
append_store(one, vector<bool>(2000, true));
for(int i = k - 1; i >= 1; --i)
{
vector<bool> tmp(2000, false);
for(int j = 0; j < n; ++j) tmp[j * k + i] = true;
int msk = cnt++;
int msk2 = cnt++;
append_store(msk2, tmp);
append_and(msk, msk2, arr);
append_xor(msk2, msk, msk2);
append_add(msk2, msk2, one);
append_right(msk2, msk2, 1999);
append_add(msk2, one, msk2);
append_and(msk, msk, msk2);
append_and(msk, arr, msk);
int pt = 1;
while(i + 1 >= pt * 2)
{
append_right(msk2, msk, pt);
append_or(msk, msk2, msk);
pt *= 2;
}
if(i + 1 - pt)
{
append_right(msk2, msk, i + 1 - pt);
append_or(msk, msk2, msk);
}
append_or(arr, arr, msk);
cnt = 2;
}
while(n > 1)
{
append_right(1, 0, (n / 2) * k);
append_and(0, 0, 1);
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... |