Submission #72062

# Submission time Handle Problem Language Result Execution time Memory
72062 2018-08-26T05:04:51 Z IDxTree(#2155, TAMREF, imeimi2000, Diuven) Key of Impassable Doors (FXCUP3_key) C++17
23 / 100
19 ms 2436 KB
#include "key.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;

int ask(int a, int b){
	static map<pii, int> mem;
	if(a>b) swap(a,b);
	if(mem.find(pii(a,b))!=mem.end()) return mem[pii(a,b)];
	TakeKey(a); if(a!=b) TakeKey(b);
	return mem[pii(a,b)]=Explore();
}

void EnsureKeyInfo(int n) {
	for(int i=1; i<=n; i++) for(int j=1; j<=n; j++){
//		cout<<ask(i,i)<<' '<<ask(i,j)<<'\n';
		if(ask(i,i)==ask(i,j)) Report(i,j);
	}
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 5 ms 832 KB Output is correct
3 Correct 6 ms 832 KB Output is correct
4 Correct 5 ms 852 KB Output is correct
5 Correct 7 ms 980 KB Output is correct
6 Correct 8 ms 1008 KB Output is correct
7 Correct 11 ms 1392 KB Output is correct
8 Correct 8 ms 1392 KB Output is correct
9 Correct 10 ms 1392 KB Output is correct
10 Correct 10 ms 1392 KB Output is correct
11 Correct 10 ms 1392 KB Output is correct
12 Correct 8 ms 1392 KB Output is correct
13 Correct 11 ms 1392 KB Output is correct
14 Correct 9 ms 1392 KB Output is correct
15 Correct 10 ms 1392 KB Output is correct
16 Correct 8 ms 1392 KB Output is correct
17 Correct 11 ms 1392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 5 ms 832 KB Output is correct
3 Correct 6 ms 832 KB Output is correct
4 Correct 5 ms 852 KB Output is correct
5 Correct 7 ms 980 KB Output is correct
6 Correct 8 ms 1008 KB Output is correct
7 Correct 11 ms 1392 KB Output is correct
8 Correct 8 ms 1392 KB Output is correct
9 Correct 10 ms 1392 KB Output is correct
10 Correct 10 ms 1392 KB Output is correct
11 Correct 10 ms 1392 KB Output is correct
12 Correct 8 ms 1392 KB Output is correct
13 Correct 11 ms 1392 KB Output is correct
14 Correct 9 ms 1392 KB Output is correct
15 Correct 10 ms 1392 KB Output is correct
16 Correct 8 ms 1392 KB Output is correct
17 Correct 11 ms 1392 KB Output is correct
18 Runtime error 19 ms 2436 KB Execution failed because the return code was nonzero
19 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 5 ms 832 KB Output is correct
3 Correct 6 ms 832 KB Output is correct
4 Correct 5 ms 852 KB Output is correct
5 Correct 7 ms 980 KB Output is correct
6 Correct 8 ms 1008 KB Output is correct
7 Correct 11 ms 1392 KB Output is correct
8 Correct 8 ms 1392 KB Output is correct
9 Correct 10 ms 1392 KB Output is correct
10 Correct 10 ms 1392 KB Output is correct
11 Correct 10 ms 1392 KB Output is correct
12 Correct 8 ms 1392 KB Output is correct
13 Correct 11 ms 1392 KB Output is correct
14 Correct 9 ms 1392 KB Output is correct
15 Correct 10 ms 1392 KB Output is correct
16 Correct 8 ms 1392 KB Output is correct
17 Correct 11 ms 1392 KB Output is correct
18 Runtime error 19 ms 2436 KB Execution failed because the return code was nonzero
19 Halted 0 ms 0 KB -