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