#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
void construct_instructions(int s, int n, int k, int q) {
vector<bool> t(2000, 0);
t[0]=true;
append_store(1, t);
for(int i=0; i<k; i++) t[i]=true;
append_store(2, t);
t[k]=1;
append_store(3, t);
append_right(4, 0, k*(n-1));
append_print(4);
for(int i=2; i<=n; i++) {
append_right(5, 0, k*(n-i)), append_and(5, 5, 2);
append_print(5);
append_xor(6, 4, 3);
append_print(6);
append_add(6, 6, 1);
append_print(6);
append_add(6, 6, 5);
append_right(6, 6, k);
append_and(6, 6, 1);
append_print(6);
append_left(7, 6, k);
append_print(7);
append_xor(8, 6, 2);
append_print(8);
append_add(8, 8, 1);
append_print(8);
append_add(6, 7, 8);
append_print(6);
append_and(10, 5, 6);
append_xor(6, 6, 2);
append_and(11, 4, 6);
append_or(4, 10, 11);
}
append_move(0, 4);
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |