#include "registers.h"
#include <vector>
using namespace std;
typedef vector<bool> vb;
const int N = 128, L = 7, B = 2000;
void construct_instructions(int s, int n, int k, int q) {
if (s == 0) {
vb aa(B);
int h, i, l;
for (i = n; i < N; i++)
aa[i * k + k - 1] = 1;
append_store(1, aa);
for (h = k - 1; h >= 0; h--) {
append_or(2, 0, 1), append_right(3, 2, k), append_and(3, 3, 2);
if (n > 2)
for (l = 1; l < L; l++)
append_right(4, 3, k << l), append_and(3, 3, 4);
append_or(5, 5, 3);
if (h > 0) {
for (l = 0; l < L; l++)
if (l == 0 || n > 2)
append_left(4, 3, k << l), append_or(3, 3, 4);
append_not(3, 3), append_and(2, 2, 3), append_or(1, 1, 2);
append_right(1, 1, 1);
}
}
append_move(0, 5);
} else {
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Incorrect min value |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Incorrect min value |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |