#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
vector <bool> v;
void construct_instructions(int s, int n, int k, int q) {
v.resize(2000);
append_store(20, v);
v[0]=1;
append_store(21, v);
for(int i=0;i<k;i++) v[i]=1;
append_store(30, v);
for(int i=0;i<2000;i++) v[i]=1;
append_store(99, v);
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
append_move(1, 0);
append_move(2, 0);
append_right(1, 1, i*k);
append_right(2, 2, j*k);
append_and(1, 1, 30);
append_and(2, 2, 30);
append_not(3, 1);
append_and(3, 3, 30);
append_add(4, 3, 2);
append_right(5, 4, k);
append_xor(6, 21, 5);
append_add(7, 30, 5);
append_add(8, 30, 6);
append_and(9, 2, 7);
append_and(10, 1, 8);
append_add(11, 9, 10);
append_and(9, 2, 8);
append_and(10, 1, 7);
append_add(12, 9, 10);
append_left(97, 30, i*k);
append_left(98, 30, j*k);
append_xor(97, 99, 97);
append_xor(98, 99, 98);
append_and(0, 97, 0);
append_and(0, 98, 0);
append_left(11, 11, i*k);
append_left(12, 12, j*k);
append_add(0, 11, 0);
append_add(0, 12, 0);
}
/*
append_move(1, 0);
append_and(1, 1, 20);
append_right(0, 0, k);
append_not(2, 0);
append_and(2, 2, 20);
append_add(3, 2, 1);
append_right(4, 3, k);
append_xor(5, 4, 21);
append_add(6, 20, 4);
append_add(7, 20, 5);
append_and(6, 20, 6);
append_and(7, 20, 7);
append_and(8, 0, 7);
append_and(9, 1, 6);
append_add(10, 8, 9);
append_right(0, 0, k);
append_left(0, 0, k);
append_add(0, 10, 0);
append_print(0);*/
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Wrong answer detected in grader |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
620 KB |
Wrong answer detected in grader |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
460 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
460 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Incorrect |
1 ms |
620 KB |
Wrong answer detected in grader |
4 |
Halted |
0 ms |
0 KB |
- |