#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
void construct_instructions(int s, int n, int k, int q) {
//only seperate when needed to save space
vector<bool> v(2000);
for(int i = 0; i<k; i++) v[i] = 1;
append_store(99,v);
append_store(1,v);
for(int i = 1; i<k; i++) v[i] = 0;
append_store(98,v);
//result is in register 1
for(int i = 0; i<n; i++){
append_move(2,0);
append_right(2,2,i*k);
append_and(2,2,99);
append_print(2);
//compute the min
append_not(3,1);
append_not(4,2);
append_add(3,3,98);
append_add(4,4,98);
append_add(5,3,2);
append_add(6,4,1);
append_right(5,5,k);
append_right(6,6,k);
append_not(5,5);
append_not(6,6);
append_and(5,1,5);
append_and(6,2,6);
append_or(1,5,6);
}
append_move(0,1);
return;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 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 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |