Submission #147084

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1470842019-08-27 13:09:48Bodo171Vision Program (IOI19_vision)C++14
100 / 100
14 ms2012 KiB
#include "vision.h"
#include <iostream>
using namespace std;
const int nmax=1005;
vector<int> d1[nmax],d2[nmax];
int wh1[nmax],wh2[nmax],ps1[nmax],ps2[nmax];
int nr,n,m,i,j;
int enc(int i,int j)
{
return m*i+j;
}
int solve(int k)
{
vector<int> arg;
for(i=k;i<=n+m-2;i++)
arg.push_back(add_and({wh1[i],ps1[i-k]}));
for(i=k;i<=n+m-2;i++)
arg.push_back(add_and({wh2[i],ps2[i-k]}));
return add_or(arg);
}
void construct_network(int H, int W, int K) {
vector<int> Ns;
nr=H*W-1;
n=H,m=W;
for(i=0;i<H;i++)
for(j=0;j<W;j++)
{
d1[i+j].push_back(enc(i,j));
d2[j-i+H-1].push_back(enc(i,j));
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...