#include "treasure.h"
#include <bits/stdc++.h>
// #pragma GCC optimize("O3")
#define ll long long
#define se second
#define fi first
#define pb push_back
#define lf (id<<1)
#define rg ((id<<1)|1)
#define md ((l+r)>>1)
#define tre countTreasure
using namespace std;
typedef pair<int,int> pii;
typedef pair<pii,pii> ipii;
const int MAXN = 1e5+10;
const int SQRT = 450;
const int INF = 2e9;
const int LOG = 20;
void chmn(int &a, int b){ a = min(a, b); }
void chmx(int &a, int b){ a = max(a, b); }
int n, pr[1010][1010];
void findTreasure (int n) {
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++){
pr[i][j] = tre(1,1,i,j);
}
}
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++){
int th = pr[i][j]-pr[i-1][j]-pr[i][j-1]+pr[i-1][j-1];
if(th) Report(i, j);
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |