Submission #590279

# Submission time Handle Problem Language Result Execution time Memory
590279 2022-07-05T18:02:35 Z farhan132 Vision Program (IOI19_vision) C++17
0 / 100
2 ms 1232 KB
#include "vision.h"
#include <bits/stdc++.h>
 
using namespace std;
 
typedef int ll;
typedef pair<ll , ll> ii;
 
#define ff first
#define ss second
#define pb push_back
#define in insert

ii num(ll m, ll x){
	return {x/m, x%m};
}

void construct_network(int H, int W, int K) {
	ll n = H * W - 1;
	vector < ll > a(n, 0);
	ll tot = 0;
	vector < ll > v;
	for(ll i = 0; i < n - 1; i++){
		ll t = add_not(i); t = 1 - t;
		if(t) tot++, v.pb(i);
		a[i] = t;
	}
	if(tot == 1) a[n - 1] = 1, v.pb(n - 1);
	auto [x1, y1] = num(W, v[0]);
	auto [x2, y2] = num(W, v[1]);
	//cout << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2 << '\n';
	if(abs(x1 - x2) + abs(y1 - y2) == K){
		vector < int > t = {v[0], v[1]};
		add_and(t);
	}else{
		add_not(v[0]);
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1232 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -