답안 #1052193

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1052193 2024-08-10T12:24:33 Z ReLice Vision Program (IOI19_vision) C++17
0 / 100
15 ms 3288 KB
#include "vision.h"
#include <bits/stdc++.h>
#define ll int
#define vll vector<ll>
#define ins insert
#define pb push_back
using namespace std;
void construct_network(int h, int w, int k) {
	ll i,j;
	auto check = [&](ll k){
		auto calc = [&](auto dia){
			vll a;
			for(auto [i, j] : dia){
				a.pb(add_or(j));
			}
			vll pr(a.size());
			
			ll n=a.size();
			for(i=0;i<n;i++){
				if(i==0) pr[i] = a[i];
				else pr[i] = add_or({pr[i - 1], a[i]});
			}
			vll res;
			for(i=k;i<n;i++){
				res.pb(add_and({pr[i - k], a[i]}));
			}
			return add_or(res);
		};
		
		map<ll,vector<ll>> dia,dia2;
		for(i=0;i<h;i++){
			for(j=0;j<w;j++){
				dia[i+j].pb(i * w + j);
				dia2[i-j].pb(i * w + j);
			}
		}
		return add_or({calc(dia), calc(dia2)});
	};
	
	ll a = check(k), b = check(k + 1);
	add_and({a, add_not(b)});
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Incorrect 0 ms 604 KB WA in grader: Instruction with no inputs
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 604 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 3100 KB Output is correct
2 Correct 1 ms 428 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 3 ms 1112 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 7 ms 1884 KB Output is correct
8 Correct 7 ms 1884 KB Output is correct
9 Correct 13 ms 3288 KB Output is correct
10 Incorrect 1 ms 344 KB WA in grader: Instruction with no inputs
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -