Submission #1031408

# Submission time Handle Problem Language Result Execution time Memory
1031408 2024-07-22T19:57:41 Z vjudge1 Vision Program (IOI19_vision) C++17
0 / 100
4 ms 1492 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;

#pragma GCC optimize("O3")
#define endl '\n'
#define db double
#define ll __int128
#define pb push_back
#define fs first
#define sd second
#define Mod long(1e9 + 7)
#define all(x) x.begin(), x.end()
#define unvisited long(-1)
#define Eps double(1e-9)
#define _for(i, n) for(int i = 0; i < (n); i++)
#define dbg(x) cout << #x ": " << x << endl;

const int Max = 1e6 + 7, Inf = 1e9 + 7;

int pos(int i, int j, int w){
	return i * w + j;
}

void construct_network(int h, int w, int k) 
{
	int ini = h*w, last = h*w-1;  //cerr << h << " " << w << " " << k << endl; 

	map <int, int> mp; 

	for(int i = 0; i < h; i++)
	{
		for(int j = 0; j < w; j++) if(i + j % 2 == 0)
		{
			for(int l = 0; l < h; l++)
			{
				for(int m = 0; m < w; m++)
				{
					if(abs(l - i) + abs(m - j) == k){
						int b = pos(l, m, w); mp[b] = 1; 
						
						add_and({ pos(l, m, w), pos(i, j, w) }); 
						//cerr << pos(l, m, w) << " " << pos(i, j, w) << endl;
						last++; 
					}
				}
			}
		}
	}

	if(ini > last) return;

	vector <int> s; 

	for(int i = ini; i <= last; i++){
		s.push_back(i); 
	}

	add_or(s); 
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (1, 0), (2, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (1, 0), (2, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (1, 0), (2, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (1, 0), (2, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 344 KB on inputs (0, 1), (0, 101), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 440 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 3 ms 984 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 344 KB Output is correct
21 Correct 4 ms 980 KB Output is correct
22 Correct 3 ms 984 KB Output is correct
23 Correct 1 ms 348 KB Output is correct
24 Correct 2 ms 344 KB Output is correct
25 Incorrect 4 ms 1492 KB WA in grader: Too many instructions
26 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 344 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB on inputs (1, 0), (2, 0), expected 1, but computed 0
4 Halted 0 ms 0 KB -