Submission #234767

# Submission time Handle Problem Language Result Execution time Memory
234767 2020-05-25T13:55:17 Z anubhavdhar Vision Program (IOI19_vision) C++14
44 / 100
15 ms 1912 KB
#include<bits/stdc++.h>
#include "vision.h"
#define ll long long int
#define pb push_back
#define mp make_pair
#define FOR(i,n) for(i=0;i<(n);++i)
#define FORe(i,n) for(i=1;i<=(n);++i)
#define FORr(i,a,b) for(i=(a);i<(b);++i)
#define FORrev(i,n) for(i=(n);i>=0;--i)
#define F0R(i,n) for(int i=0;i<(n);++i)
#define F0Re(i,n) for(int i=1;i<=(n);++i)
#define F0Rr(i,a,b) for(ll i=(a);i<(b);++i)
#define F0Rrev(i,n) for(int i=(n);i>=0;--i)
#define ii pair<ll,ll>
#define vi vector<ll>
#define vii vector<ii>
#define ff first 
#define ss second
#define cd complex<double>
#define vcd vector<cd>
#define ldd long double
#define dbgLine cout<<"Line : "<<__LINE__<<'\n'
#define all(x) (x).begin(),(x).end()
using namespace std;
/*
 
const short int __PRECISION = 10;
 
const ll MOD = 1e9+7;
const ll INF = 1e17 + 1101;
const ll LOGN = 17;
const ll MAXN = 2e5+5;
const ll ROOTN = 320;
 
const ldd PI = acos(-1);
const ldd EPS = 1e-7;
 
void add_and(vector<int> A)
{
	cout<<"and : ";
	for(int x : A)
		cout<<x<<' ';
	cout<<'\n';
}
 
void add_or(vector<int> A)
{
	cout<<"or : ";
	for(int x : A)
		cout<<x<<' ';
	cout<<'\n';
}
 
void add_xor(vector<int> A)
{
	cout<<"xor : ";
	for(int x : A)
		cout<<x<<' ';
	cout<<'\n';
}
 
void add_not(int A){cout<<"and : "<<A<<'\n';}
*/
 
#define inside(a, b) ((a) >= 0 && (a) < H && (b) >= 0 && (b) < W)
void construct_network(int H, int W, int K)
{
	int states = H*W;
	vector<int> V;
	F0R(i, H)
		F0R(j, W)
		{
			V.clear();
			F0Re(k, K)
			{
				if(inside(i+k-K, j+k))
					V.pb((i + k - K) * W + j + k);
				if(inside(i+k, j+K-k))
					V.pb((i + k) * W + j + K - k);
			}
			if(!V.empty())
			{
				add_or(V);
				add_and({states, i*W + j});
				states += 2;
			}
		}
	V.clear();
	for(int i = H*W + 1; i < states; i += 2)
		V.pb(i);
	add_or(V);
}
/*
int main()
{
  
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	
	int H, W, K;
	cin>>H>>W>>K;
	construct_network(H, W, K);
	return 0;
}*/
# Verdict Execution time Memory Grader output
1 Correct 4 ms 256 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 4 ms 256 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 4 ms 256 KB Output is correct
10 Correct 4 ms 256 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 4 ms 256 KB Output is correct
16 Correct 4 ms 256 KB Output is correct
17 Correct 5 ms 256 KB Output is correct
18 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 256 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 4 ms 256 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 4 ms 256 KB Output is correct
10 Correct 4 ms 256 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 4 ms 256 KB Output is correct
16 Correct 4 ms 256 KB Output is correct
17 Correct 5 ms 256 KB Output is correct
18 Correct 5 ms 256 KB Output is correct
19 Correct 4 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 4 ms 256 KB Output is correct
22 Correct 6 ms 256 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 256 KB Output is correct
26 Correct 5 ms 256 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 256 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 4 ms 256 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 4 ms 256 KB Output is correct
10 Correct 4 ms 256 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 4 ms 256 KB Output is correct
16 Correct 4 ms 256 KB Output is correct
17 Correct 5 ms 256 KB Output is correct
18 Correct 5 ms 256 KB Output is correct
19 Correct 4 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 4 ms 256 KB Output is correct
22 Correct 6 ms 256 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 256 KB Output is correct
26 Correct 5 ms 256 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
28 Correct 7 ms 640 KB Output is correct
29 Correct 5 ms 256 KB Output is correct
30 Correct 5 ms 256 KB Output is correct
31 Correct 5 ms 256 KB Output is correct
32 Correct 5 ms 384 KB Output is correct
33 Correct 6 ms 512 KB Output is correct
34 Correct 7 ms 512 KB Output is correct
35 Correct 7 ms 512 KB Output is correct
36 Correct 5 ms 384 KB Output is correct
37 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 256 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 4 ms 256 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 4 ms 256 KB Output is correct
10 Correct 4 ms 256 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 4 ms 256 KB Output is correct
16 Correct 4 ms 256 KB Output is correct
17 Correct 5 ms 256 KB Output is correct
18 Correct 5 ms 256 KB Output is correct
19 Correct 4 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 4 ms 256 KB Output is correct
22 Correct 6 ms 256 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 256 KB Output is correct
26 Correct 5 ms 256 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
28 Correct 7 ms 640 KB Output is correct
29 Correct 5 ms 256 KB Output is correct
30 Correct 5 ms 256 KB Output is correct
31 Correct 5 ms 256 KB Output is correct
32 Correct 5 ms 384 KB Output is correct
33 Correct 6 ms 512 KB Output is correct
34 Correct 7 ms 512 KB Output is correct
35 Correct 7 ms 512 KB Output is correct
36 Correct 5 ms 384 KB Output is correct
37 Correct 5 ms 256 KB Output is correct
38 Incorrect 9 ms 1912 KB WA in grader: Too many instructions
39 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 4 ms 384 KB Output is correct
3 Correct 4 ms 256 KB Output is correct
4 Correct 4 ms 256 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 5 ms 384 KB Output is correct
8 Correct 4 ms 384 KB Output is correct
9 Correct 5 ms 384 KB Output is correct
10 Correct 5 ms 384 KB Output is correct
11 Correct 5 ms 256 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 4 ms 256 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 5 ms 384 KB Output is correct
17 Correct 5 ms 256 KB Output is correct
18 Correct 5 ms 384 KB Output is correct
19 Correct 5 ms 256 KB Output is correct
20 Correct 4 ms 256 KB Output is correct
21 Correct 5 ms 256 KB Output is correct
22 Correct 4 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 4 ms 256 KB Output is correct
3 Correct 8 ms 764 KB Output is correct
4 Correct 15 ms 1404 KB Output is correct
5 Correct 12 ms 1020 KB Output is correct
6 Correct 8 ms 640 KB Output is correct
7 Correct 5 ms 384 KB Output is correct
8 Incorrect 6 ms 1148 KB WA in grader: Too many instructions
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 1148 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 256 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 4 ms 256 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 4 ms 256 KB Output is correct
10 Correct 4 ms 256 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 256 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 4 ms 256 KB Output is correct
16 Correct 4 ms 256 KB Output is correct
17 Correct 5 ms 256 KB Output is correct
18 Correct 5 ms 256 KB Output is correct
19 Correct 4 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 4 ms 256 KB Output is correct
22 Correct 6 ms 256 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 256 KB Output is correct
26 Correct 5 ms 256 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
28 Correct 7 ms 640 KB Output is correct
29 Correct 5 ms 256 KB Output is correct
30 Correct 5 ms 256 KB Output is correct
31 Correct 5 ms 256 KB Output is correct
32 Correct 5 ms 384 KB Output is correct
33 Correct 6 ms 512 KB Output is correct
34 Correct 7 ms 512 KB Output is correct
35 Correct 7 ms 512 KB Output is correct
36 Correct 5 ms 384 KB Output is correct
37 Correct 5 ms 256 KB Output is correct
38 Incorrect 9 ms 1912 KB WA in grader: Too many instructions
39 Halted 0 ms 0 KB -