Submission #63355

#TimeUsernameProblemLanguageResultExecution timeMemory
63355bazsi700Treasure (different grader from official contest) (CEOI13_treasure2)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "treasure.h" using namespace std; #define MOD 1000000007 #define ll long long int #define vi vector<int> #define vii vector< vector<int> > #define PI 3.1415926535897932384626433832795 #define INF 9223372036854775807LL //16:20 bool table[105][105]; int query(int r1, int c1, int r2, int c2) { return countTreasure(r1,c1,r2,c2); /*cout << r1 << " " << c1 << " " << r2 << " " << c2 << "\n" << flush; int x; cin >> x; return x;*/ } void solve(int r1, int c1, int r2, int c2, int cnt) { if(cnt == 0) { return; } if(r1 == r2 && c1 == c2) { table[r1][c1] = true; return; } if(r2-r1 > c2-c1) { int mid = (r1+r2)/2; int cn1 = query(r1,c1,mid,c2); solve(r1,c1,mid,c2,cn1); solve(mid+1,c1,r2,c2,cnt-cn1); } else { int mid = (c1+c2)/2; int cn1 = query(r1,c1,r2,mid); solve(r1,c1,r2,mid,cn1); solve(r1,mid+1,r2,c2,cnt-cn1); } } void findTreasure() { ios::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; int x = query(1,1,n,n); solve(1,1,n,n,x); for(int i = 1; i <= n; i++) { for(int j = 1; j <= n; j++) { if(table[i][j]) { Report(i,j); } } } }

Compilation message (stderr)

/tmp/ccpccYwj.o: In function `main':
grader.c:(.text.startup+0x109): undefined reference to `findTreasure(int)'
collect2: error: ld returned 1 exit status