#include "registers.h"
#include "bits/stdc++.h"
using namespace std;
void mi(int a,int b,int k){
append_not(3,b);
append_add(3,3,20);
append_add(3,a,3);
append_and(3,3,22);
append_move(4,3);
append_right(3,3,k);
append_add(3,3,22);
append_not(3,3);
append_and(4,3,4);
append_add(4,b,4);
append_move(7,4);
append_add(5,a,b);
append_not(4,4);
append_add(4,4,20);
append_and(4,4,22);
append_add(5,5,4);
append_and(5,5,21);
append_move(8,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(21,v);
v[k] = 1;
append_store(22,v);
for(int i = 1;i<=k;i++)v[i] = 0;
append_store(20,v);
for(int i = 0;i<n;i++){
append_move(10+i,0);
append_and(10+i,10+i,21);
append_right(0,0,k);
}
/*for(int i = 0;i<n;i++){
append_print(i+10);
}*/
append_print(10);
append_print(11);
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);
}
}
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 |
392 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 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 |
0 ms |
344 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
604 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
604 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |