# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
304387 | 2020-09-21T08:44:52 Z | daniel920712 | Vision Program (IOI19_vision) | C++14 | 24 ms | 2040 KB |
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <vector> #include <stdlib.h> #include "vision.h" using namespace std; vector < int > temp; vector < int > temp2; vector < int > all; vector < int > ans; int x[205]; int y[205]; int dex[205]; int dey[205]; void construct_network(int H, int W, int K) { int i,j,k,now=H*W-1; for(i=0;i<H;i++) { temp.clear(); for(j=0;j<K;j++) { temp.push_back(i*W+j); } } /*if(K!=1||H==1||W==1) { for(i=0;i<H;i++) { for(j=0;j<W;j++) { temp.clear(); for(k=0;k<=K;k++) if(i+k<H&&j+(K-k)<W) temp.push_back((i+k)*W+j+(K-k)); for(k=0;k<=K;k++) if(i+k<H&&j-(K-k)>=0) temp.push_back((i+k)*W+j-(K-k)); if(!temp.empty()) { temp2.clear(); temp2.push_back(i*W+j); add_or(temp); now++; temp2.push_back(now); add_and(temp2); now++; all.push_back(now); } if(i==0&&j==0&&max(H,W)>30&&min(H,W)!=1) { add_or(all); return; } } } add_or(all); } else*/ { for(i=0;i<H;i++) { temp.clear(); for(j=0;j<W;j++) temp.push_back(i*W+j); add_or(temp); now++; x[i]=now; } for(i=0;i<W;i++) { temp.clear(); for(j=0;j<H;j++) temp.push_back(j*W+i); add_or(temp); now++; y[i]=now; } for(i=1;i<H;i++) { temp.clear(); temp.push_back(x[i]); temp.push_back(x[i-1]); add_and(temp); now++; temp2.push_back(now); } for(i=0;i<W;i++) { temp.clear(); for(j=0;j<W;j++) if(i!=j) temp.push_back(y[j]); add_or(temp); now++; add_not(now); now++; all.push_back(now); } add_or(temp2); temp.clear(); now++; temp.push_back(now); add_or(all); now++; temp.push_back(now); add_and(temp); now++; ans.push_back(now); for(i=1;i<W;i++) { temp.clear(); temp.push_back(y[i]); temp.push_back(y[i-1]); add_and(temp); now++; temp2.push_back(now); } for(i=0;i<H;i++) { temp.clear(); for(j=0;j<H;j++) if(i!=j) temp.push_back(x[j]); add_or(temp); now++; add_not(now); now++; all.push_back(now); } add_or(temp2); temp.clear(); now++; temp.push_back(now); add_or(all); now++; temp.push_back(now); add_and(temp); now++; ans.push_back(now); add_or(ans); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | WA in grader: Instruction with no inputs |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | WA in grader: Instruction with no inputs |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | WA in grader: Instruction with no inputs |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | WA in grader: Instruction with no inputs |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 512 KB | WA in grader: Instruction with no inputs |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Incorrect | 1 ms | 256 KB | on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 24 ms | 2040 KB | Output is correct |
2 | Correct | 1 ms | 256 KB | Output is correct |
3 | Correct | 3 ms | 512 KB | Output is correct |
4 | Correct | 4 ms | 640 KB | Output is correct |
5 | Incorrect | 1 ms | 512 KB | WA in grader: Instruction with no inputs |
6 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | WA in grader: Instruction with no inputs |
2 | Halted | 0 ms | 0 KB | - |