답안 #291335

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
291335 2020-09-05T07:12:14 Z mohammad Vision Program (IOI19_vision) C++14
8 / 100
1 ms 460 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
 
#define endl "\n"
// #define int long long

typedef long long ll ;
const ll ooo = 1e14 ;
const ll oo = 2e9 ;
const double PI = acos(-1) ;
const ll M = 1e9 + 7  ;
const int N = 10000010  ;

map<pair<int , int> , int > mp ;

void construct_network(int H, int W, int K) {
	vector<int> Ns , f;
	for(int i = 0 ; i < 1 ; ++i){
		for(int j = 0 ; j < 1 ; ++j){
			for(int l = 0 ; l <= K ; l++){
				int u = K - l ;
				int nx = i + l , ny = j + u ;
				int vl = i * W + j , vl1 = nx * W + ny;
				//cout << "X : " << i << ' ' << j << endl;
				if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){
					//cout << nx << ' ' << ny << endl;
					mp[{vl , vl1}] = 1;
					mp[{vl1 , vl}] = 1;
					Ns = {vl , vl1};
					int a = add_and(Ns);
					f.push_back(a);
				}
				nx = i - l , ny = j + u;
				vl1 = nx * W + ny;
				if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){
					//cout << nx << ' ' << ny << endl;
					mp[{vl , vl1}] = 1;
					mp[{vl1 , vl}] = 1;
					Ns = {vl , vl1};
					int a = add_and(Ns);
					f.push_back(a);
				}
				nx = i - l , ny = j - u;
				vl1 = nx * W + ny;
				if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){
					//cout << nx << ' ' << ny << endl;
					mp[{vl , vl1}] = 1;
					mp[{vl1 , vl}] = 1;
					Ns = {vl , vl1};
					int a = add_and(Ns);
					f.push_back(a);
				}
				nx = i + l , ny = j - u;
				vl1 = nx * W + ny;
				if(min(nx , ny) >= 0 && nx < H && ny < W && !mp[{vl , vl1}]){
					//cout << nx << ' ' << ny << endl;
					mp[{vl , vl1}] = 1;
					mp[{vl1 , vl}] = 1;
					Ns = {vl , vl1};
					int a = add_and(Ns);
					f.push_back(a);
				}
			}
		}
	}
	// int c = add_xor(Ns);
	// add_not(c);
	add_or(f);
	return ;
}

// freopen("C:\\Users\\mhmdsa\\Documents\\c++\\input.txt" , "r" , stdin );
// freopen("C:\\Users\\mhmdsa\\Documents\\c++\\output.txt" , "w" , stdout );
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 0 ms 256 KB Output is correct
5 Correct 0 ms 256 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 0 ms 256 KB Output is correct
8 Correct 1 ms 256 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 256 KB Output is correct
11 Correct 1 ms 384 KB Output is correct
12 Correct 1 ms 256 KB Output is correct
13 Correct 1 ms 256 KB Output is correct
14 Correct 1 ms 256 KB Output is correct
15 Correct 1 ms 256 KB Output is correct
16 Correct 1 ms 256 KB Output is correct
17 Correct 1 ms 460 KB Output is correct
18 Correct 1 ms 256 KB Output is correct
19 Correct 0 ms 256 KB Output is correct
20 Correct 1 ms 288 KB Output is correct
21 Correct 1 ms 384 KB Output is correct
22 Correct 1 ms 384 KB Output is correct
23 Correct 1 ms 256 KB Output is correct
24 Correct 1 ms 256 KB Output is correct
25 Correct 1 ms 384 KB Output is correct
26 Correct 1 ms 256 KB Output is correct
27 Correct 1 ms 256 KB Output is correct
28 Correct 1 ms 376 KB Output is correct
29 Correct 1 ms 384 KB Output is correct
30 Correct 1 ms 384 KB Output is correct
31 Correct 1 ms 256 KB Output is correct
32 Correct 0 ms 256 KB Output is correct
33 Correct 1 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -