#include<bits/stdc++.h>
#include "treasure.h"
using namespace std;
#define int long long
void findTreasure(signed n){
vector<vector<int>> s(n, vector<int> (n, 0));
for(int x = 0; x<n; x++){
for(int y= 0; y<n; y++){
s[x][y] = countTreasure(1, 1, x+1, y+1);
}
}
vector<vector<int>> v(n, vector<int> (n, 0));
v[0][0] = s[0][0];
for(int i = 1; i<n; i++){
v[0][i] = s[0][i] - s[0][i-1];
}
for(int i = 1; i<n; i++){
v[i][0] = s[i][0] - s[i-1][0];
}
for(int x= 1; x<n; x++){
for(int y= 1; y<n; y++){
v[x][y] = s[x][y] + s[x-1][y-1] - s[x-1][y] - s[x][y-1];
}
}
cout<<"END"<<endl;
for(int i = 0; i<n; i++){
for(int j= 0; j<n; j++){
if(v[i][j] ==1){
Report(i+1, j+1);
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Invalid Access |
2 |
Incorrect |
0 ms |
212 KB |
Invalid Access |
3 |
Incorrect |
0 ms |
212 KB |
Invalid Access |
4 |
Incorrect |
0 ms |
212 KB |
Invalid Access |
5 |
Incorrect |
1 ms |
340 KB |
Invalid Access |
6 |
Incorrect |
1 ms |
340 KB |
Invalid Access |
7 |
Incorrect |
1 ms |
340 KB |
Invalid Access |
8 |
Incorrect |
1 ms |
468 KB |
Invalid Access |
9 |
Incorrect |
1 ms |
468 KB |
Invalid Access |
10 |
Incorrect |
1 ms |
468 KB |
Invalid Access |