#include <algorithm>
#include <iostream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <cstdio>
#include <unistd.h>
#include <cassert>
#include <string>
#include <set>
using namespace std;
#define NN 500005
#define ll long long int
#define fo(i,x,y) for(int i=x;i<=y;i++)
#define fs(ar,n) fo(i,1,n) cin>>ar[i]
#define sp " "
#define fast cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false)
#define pb push_back
#define ppb pop_back
#define fi first
#define se second
#define ii pair<int,int>
#define lli pair<ll,ll>
#define fast2 freopen ("in.txt","r",stdin);freopen ("out.txt","w",stdout);
#define inf 1000000000
#define MP make_pair
#include "vision.h"
using namespace std;
// vector<int> v;
void construct_network(int H, int W, int K)
{
int flag=0;
ll cnt=0;
for(int i=0;i<H;i++)
{
for(int j=0;j<W;j++)
{
for(int g=i;g<H;g++)
{
for(int h=j;h<W;h++)
{
vector<int> v={i*W+j,g*W+h};
if(g-i+h-j==K)
{
ll x=add_and(v);
cnt++;
if(x)
flag=cnt;
}
}
}
}
}
if(flag!=0)
{
add_or({-1});
return;
}
vector<int> v;
// for(int i=H*W+1;i<=cnt;i++)
v.pb(flag+H*W-1);
add_or(v);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
288 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1064 ms |
888 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |