#include "treasure.h"
#include <bits/stdc++.h>
using namespace std;
int ans[105][105];
void findTreasure (int N) {
//int cnt = countTreasure(1, 1, N, N);
//if(cnt > 0) Report (1, 1);
ans[1][1] = countTreasure(1,1, 1,1);
for (int i=1; i<=N; i++){
for (int j=1; j<=N; j++){
if (j==i && j == 1) continue;
int acc = 0;
for (int k=1; k<=i; k++){
for (int l=1; l<=j; l++){
acc += ans[k][l];
}
}
/*for (int k=1; k<=i; k++){
for (int l=1; l<=j - 1; l++){
acc -= acc[k][l];
}
}
for (int k=1; k<=i - 1; k++){
for (int l=1; l<=j; l++){
acc -= acc[k][l];
}
}
for (int k=1; k<=i - 1; k++){
for (int l=1; l<=j - 1; l++){
acc += acc[k][l];
}
}*/
ans[i][j] = countTreasure(1,1, i,j) - acc;
}
}
for (int i=1; i<=N; i++){
for (int j=1; j<=N; j++){
if (ans[i][j]) Report(i,j);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
0 ms |
364 KB |
Output is partially correct - N = 5, K = 425, score = 8 |
2 |
Partially correct |
0 ms |
364 KB |
Output is partially correct - N = 10, K = 7075, score = 4 |
3 |
Partially correct |
1 ms |
364 KB |
Output is partially correct - N = 15, K = 36450, score = 4 |
4 |
Partially correct |
1 ms |
364 KB |
Output is partially correct - N = 16, K = 47296, score = 4 |
5 |
Partially correct |
3 ms |
364 KB |
Output is partially correct - N = 55, K = 6782050, score = 4 |
6 |
Partially correct |
5 ms |
364 KB |
Output is partially correct - N = 66, K = 14090571, score = 4 |
7 |
Partially correct |
8 ms |
364 KB |
Output is partially correct - N = 77, K = 26140961, score = 4 |
8 |
Partially correct |
13 ms |
492 KB |
Output is partially correct - N = 88, K = 44642224, score = 4 |
9 |
Partially correct |
19 ms |
492 KB |
Output is partially correct - N = 99, K = 71566902, score = 4 |
10 |
Partially correct |
20 ms |
484 KB |
Output is partially correct - N = 100, K = 74507500, score = 4 |