답안 #200406

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
200406 2020-02-06T17:20:03 Z hank55663 Vision Program (IOI19_vision) C++14
20 / 100
61 ms 5112 KB
#include "vision.h"
#include<bits/stdc++.h>
#define pb push_back
#define x first
#define y second
using namespace std;
void construct_network(int H, int W, int K) {
	map<int,vector<int> > m;
	map<int,vector<int> > m2;
	map<int,int> mm,mm2;
	for(int i = 0;i<H;i++){
		for(int j=0;j<W;j++){
			m[i+j].pb(i*W+j);
			m2[i-j].pb(i*W+j);
		}
	}
	vector<int> vv;
	for(auto it:m){
		mm[it.x]=add_or(it.y);	
	}
	for(auto it:m2){
		mm2[it.x]=add_or(it.y);
	}
	for(auto it:mm){
		if(mm.find(it.x+K)!=mm.end())
		vv.pb(add_and({it.x,mm[it.x+K]}));
	}
	for(auto it:mm){
		if(mm2.find(it.x+K)!=mm2.end())
		vv.pb(add_and({it.x,mm2[it.x+K]}));
	}

	int a=add_or(vv);
	vector<int> ok;
	ok.pb(a);
	for(auto it:mm){
		vector<int> tmp;
		for(auto it2:mm){
			if(abs(it.x-it2.x)>K)tmp.pb(it2.y);
		}
		if(tmp.size()){
			int a=add_or(tmp);
			ok.pb(add_not(add_and({it.y,a})));
		}
	}
	for(auto it:mm2){
		vector<int> tmp;
		for(auto it2:mm2){
			if(abs(it.x-it2.x)>K)tmp.pb(it2.y);
		}
		if(tmp.size()){
			int a=add_or(tmp);
			ok.pb(add_not(add_and({it.y,a})));
		}
	}
	add_and(ok);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 248 KB Output is correct
5 Incorrect 5 ms 256 KB on inputs (1, 0), (1, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 248 KB Output is correct
5 Incorrect 5 ms 256 KB on inputs (1, 0), (1, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 248 KB Output is correct
5 Incorrect 5 ms 256 KB on inputs (1, 0), (1, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 248 KB Output is correct
5 Incorrect 5 ms 256 KB on inputs (1, 0), (1, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 1144 KB Output is correct
2 Correct 9 ms 632 KB Output is correct
3 Correct 9 ms 632 KB Output is correct
4 Correct 6 ms 376 KB Output is correct
5 Correct 14 ms 1144 KB Output is correct
6 Correct 11 ms 760 KB Output is correct
7 Correct 7 ms 508 KB Output is correct
8 Correct 6 ms 376 KB Output is correct
9 Correct 14 ms 1144 KB Output is correct
10 Correct 11 ms 888 KB Output is correct
11 Correct 8 ms 504 KB Output is correct
12 Correct 8 ms 632 KB Output is correct
13 Correct 7 ms 504 KB Output is correct
14 Correct 6 ms 376 KB Output is correct
15 Correct 14 ms 1148 KB Output is correct
16 Correct 11 ms 888 KB Output is correct
17 Correct 9 ms 632 KB Output is correct
18 Correct 10 ms 632 KB Output is correct
19 Correct 6 ms 504 KB Output is correct
20 Correct 6 ms 380 KB Output is correct
21 Correct 5 ms 256 KB Output is correct
22 Correct 5 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 10 ms 760 KB Output is correct
4 Correct 8 ms 632 KB Output is correct
5 Correct 7 ms 632 KB Output is correct
6 Correct 7 ms 504 KB Output is correct
7 Correct 6 ms 376 KB Output is correct
8 Correct 15 ms 1272 KB Output is correct
9 Correct 12 ms 1016 KB Output is correct
10 Correct 9 ms 760 KB Output is correct
11 Correct 8 ms 632 KB Output is correct
12 Correct 8 ms 504 KB Output is correct
13 Correct 14 ms 1144 KB Output is correct
14 Correct 11 ms 760 KB Output is correct
15 Correct 8 ms 504 KB Output is correct
16 Correct 6 ms 376 KB Output is correct
17 Correct 14 ms 1144 KB Output is correct
18 Correct 9 ms 632 KB Output is correct
19 Correct 6 ms 376 KB Output is correct
20 Correct 34 ms 2936 KB Output is correct
21 Correct 23 ms 2040 KB Output is correct
22 Correct 17 ms 1272 KB Output is correct
23 Correct 13 ms 1016 KB Output is correct
24 Correct 33 ms 2936 KB Output is correct
25 Correct 19 ms 1656 KB Output is correct
26 Correct 12 ms 1020 KB Output is correct
27 Correct 61 ms 5112 KB Output is correct
28 Correct 42 ms 3704 KB Output is correct
29 Correct 31 ms 2680 KB Output is correct
30 Correct 23 ms 2128 KB Output is correct
31 Correct 20 ms 1784 KB Output is correct
32 Correct 5 ms 380 KB Output is correct
33 Correct 5 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 56 ms 5112 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 248 KB Output is correct
5 Incorrect 5 ms 256 KB on inputs (1, 0), (1, 1), expected 1, but computed 0
6 Halted 0 ms 0 KB -