Submission #256680

# Submission time Handle Problem Language Result Execution time Memory
256680 2020-08-03T06:27:09 Z b00n0rp Vision Program (IOI19_vision) C++17
0 / 100
1 ms 256 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;

#define REP(i,n) for(int i = 0; i < n; i ++)
#define FOR(i,a,b) for(int i = a; i < b; i++)
#define vi vector<int>
#define pb push_back

void construct_network(int H, int W, int K){
	if(max(H,W) <= 30 or min(H,W) == 1){
		vi v;
		REP(i1,H){
			REP(j1,W){
				REP(i2,H){
					REP(j2,W){
						if(i1*W+j1 < i2*W+j2 and abs(i1-i2)+abs(j1-j2) == K){
							v.pb(add_and({i1*W+j1,i2*W+j2}));
						}
					}
				}
			}
		}
		add_or(v);
		cout << ":-> " << v.size()+1 << endl;
	}
	else{
		vi v;
		REP(i1,1){
			REP(j1,1){
				REP(i2,H){
					REP(j2,W){
						if(i1*W+j1 < i2*W+j2 and abs(i1-i2)+abs(j1-j2) == K){
							v.pb(add_and({i1*W+j1,i2*W+j2}));
						}
					}
				}
			}
		}
		add_or(v);
		cout << ":-> " << v.size()+1 << endl;
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB secret mismatch
2 Halted 0 ms 0 KB -