#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
template<class T, class U>
void ckmin(T &a, U b)
{
if (a > b) a = b;
}
template<class T, class U>
void ckmax(T &a, U b)
{
if (a < b) a = b;
}
#define MP make_pair
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define FOR(i, a, b) for (auto i = (a); i < (b); i++)
#define FORD(i, a, b) for (auto i = (a) - 1; i >= (b); i--)
#define SZ(x) ((int) (x).size())
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpi;
typedef vector<pll> vpl;
int N, M, K, C;
vi tmp;
void construct_network(int n, int m, int k)
{
//you want to see if the two squares with 1 are at distance K
N = n; M = m; K = k;
C = N * M;
FOR(i, 0, N)
{
FOR(j, 0, M)
{
FOR(k, 0, K + 1)
{
pii p = {i + k, j + (K - k)};
if (p.fi < N && p.se < M)
{
tmp.clear();
tmp.PB(i * M + j); tmp.PB(p.fi * M + p.se);
// for (int x : tmp)
// {
// cerr << x << ' ';
// }
// cerr << endl;
// add_and(tmp);
C++;
}
p = {i + k, j - (K - k)};
if (p.fi < N && p.se >= 0)
{
tmp.clear();
tmp.PB(i * M + j); tmp.PB(p.fi * M + p.se);
// for (int x : tmp)
// {
// cerr << x << ' ';
// }
// cerr << endl;
add_and(tmp);
C++;
}
}
}
}
tmp.clear();
FOR(i, N * M, C)
{
tmp.PB(i);
}
add_or(tmp);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
1144 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |