제출 #50955

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
509552018-06-15 09:18:07aquablitz11열대 식물원 (Tropical Garden) (IOI11_garden)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "garden.h"
using namespace std;
const int N = 150010;
const int INF = 2e9;
vector<int> mn[N], G[2*N];
int nxt[2*N], deg[2*N], h[2*N], ph[2*N];
bool comp[2*N][3];
void expand(int u, int c, int s, int d=0, int p=-INF)
{
if (comp[u][c])
return;
if (deg[u] != 1 && (u == 2*s || u == 2*s+1))
p = 0;
h[u] = d, ph[u] = p;
comp[u][c] = true;
for (auto v : G[u])
expand(v, c, s, d+1, p+1);
}
void count_routes(int n, int m, int p, int R[][2], int q, int K[])
{
// find min and second-min
for (int i = 0; i < m; ++i) {
int u = R[i][0], v = R[i][1];
if (mn[u].size() < 2)
mn[u].push_back(v);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:107:9: error: 'answer' was not declared in this scope
         answer(cnt);
         ^~~~~~
garden.cpp:107:9: note: suggested alternative: 'assert'
         answer(cnt);
         ^~~~~~
         assert