This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define lp(i,a,b) for(int i = a; i < b ; i++)
#define ff first
#define ss second
#define pb push_back
#define ll long long
#define mk make_pair
#define sz(x) (int)(x.size())
#define pii pair<int,int>
#define mkt make_tuple
#define debug printf
#include "vision.h"
using namespace std ;
int N, M ;
int code(int i, int j) { return i * M + j ; }
void construct_network(int H, int W, int K)
{
N = H ;
M = W ;
int lastIdx = H*W - 1 ;
vector<int> v ;
lp(i,0,H)
lp(j,0,W)
if( j+i == K )
{
v = {0, code(i,j) };
lastIdx = add_and(v) ;
}
v.clear() ;
lp(i,H*W , lastIdx + 1 ) v.pb( i ) ;
add_or(v) ;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |