#include <bits/stdc++.h>
#include <iostream>
#include "vision.h"
using namespace std;
#define rep(i,a,b) for(int i = a; i < b; i++)
#define pb push_back
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
int w, h, k, inst;
// bool add_or(vi& q) {
// cout << "or:\n";
// for(auto &i : q) cout << i << " ";cout<<endl;
// bool ans; cin >> ans;
// return ans;
// }
//
// bool add_and(vi& q) {
// cout << "and:\n";
// for(auto &i : q) cout << i << " ";cout<<endl;
// bool ans; cin >> ans;
// return ans;
// }
//
// bool add_not(int x ) {
// cout << "not:\n";
// cout << x << endl;
// bool ans; cin >> ans; return ans;
// }
void AND(int x1, int y1, int x2, int y2) {
vi ask = {x1 + y1 * w, x2 + y2 * w};
add_and(ask);
inst++;
}
void construct_network(int H, int W, int K) {
h = H; w = W; k = K;
inst = w*h;
rep(x, 0, w) rep(y, 0, h) {
if (x + 1 < w) AND(x + 1, y, x, y);
if (y + 1 < h) AND(x, y + 1, x, y);
}
vi ask;
rep(i, w*h, inst) ask.pb(i);
add_or(ask);
return;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
968 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |