제출 #48962

#제출 시각아이디문제언어결과실행 시간메모리
48962BenqTreasure (different grader from official contest) (CEOI13_treasure2)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; typedef vector<cd> vcd; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>; #define FOR(i, a, b) for (int i=a; i<(b); i++) #define F0R(i, a) for (int i=0; i<(a); i++) #define FORd(i,a,b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; #include "treasure.h" int cum[101][101]; /*int ans = 0, tmp[101][101]; void Report(int a, int b) { cout << a << " " << b << "\n"; } int countTreasure(int a1, int b1, int a2, int b2) { assert (a1 <= a2 && b1 <= b2); int z = 0; FOR(i,a1,a2+1) FOR(j,b1,b2+1) z += tmp[i][j]; ans += 50*50+1-(a2-a1+1)*(b2-b1+1); return z; }*/ int query(int a, int b) { return cum[a][b]-cum[a-1][b]-cum[a][b-1]+cum[a-1][b-1]; } void findTreasure (int N, bool b = 1) { if (N > 2) findTreasure(N-1,0); cum[N][N] = countTreasure(1, 1, N, N); for (int i = 1; i < N; ++i) { if (i > N-i) { cum[i][N] = countTreasure(1,1,i,N); cum[N][i] = countTreasure(1,1,N,i); } else { cum[i][N] = cum[N][N]-countTreasure(i+1,1,N,N); cum[N][i] = cum[N][N]-countTreasure(1,i+1,N,N); } } if (b) { FOR(i,1,N+1) FOR(j,1,N+1) if (query(i,j) > 0) Report (i,j); } }

컴파일 시 표준 에러 (stderr) 메시지

grader.c: In function 'int main()':
grader.c:63:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         my_assert(strlen(A[i]+1) == N, "each line of the map must contain N zeroes or ones (before loop)");
                   ~~~~~~~~~~~~~~~^~~~
/tmp/ccPykEAm.o: In function `main':
grader.c:(.text.startup+0x106): undefined reference to `findTreasure(int)'
collect2: error: ld returned 1 exit status