Submission #511123

# Submission time Handle Problem Language Result Execution time Memory
511123 2022-01-15T07:44:40 Z bebecanvas Cave (IOI13_cave) C++14
34 / 100
26 ms 368 KB
#include "cave.h"
#include <queue>
 
void exploreCave(int N) {
	
	int d[N];
	int s[N];
	for(int i=0; i<N; i++){s[i]=0;}
	while(tryCombination(s)!=-1){
		int a= tryCombination(s);
		for(int i=0; i<N; i++){
			s[i]++; s[i]%=2;
			if(tryCombination(s)==-1||tryCombination(s)>a){break;}
			s[i]++; s[i]%=2;
		}
	}
	
	for(int i=0; i<N; i++){
		s[i]+=1; s[i]%=2;
		int a= tryCombination(s);
		d[i]=a;
		s[i]+=1; s[i]%=2;
	}
    
    answer(s, d);
	
}
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 332 KB too much calls on tryCombination()
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 9 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 9 ms 364 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 9 ms 332 KB Output is correct
7 Correct 8 ms 332 KB Output is correct
8 Correct 15 ms 364 KB Output is correct
9 Correct 10 ms 368 KB Output is correct
10 Correct 10 ms 332 KB Output is correct
11 Correct 10 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 276 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 280 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 332 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 0 ms 204 KB Output is correct
13 Correct 0 ms 288 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 276 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 280 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 332 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 0 ms 204 KB Output is correct
13 Correct 0 ms 288 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 0 ms 204 KB Output is correct
16 Correct 0 ms 284 KB Output is correct
17 Correct 0 ms 204 KB Output is correct
18 Correct 0 ms 204 KB Output is correct
19 Correct 0 ms 204 KB Output is correct
20 Incorrect 2 ms 284 KB too much calls on tryCombination()
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 332 KB too much calls on tryCombination()
2 Halted 0 ms 0 KB -