제출 #589629

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5896292022-07-05 01:06:40gg123_pe공장들 (JOI14_factories)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
#define f(i,a,b) for(int i = a; i < b; i++)
#define fa(i,a,b) for(int i = a; i >= b; i--)
#define ff first
#define ss second
const int N = 5e5 + 5;
const ll inf = 1e17 + 100;
int n, p[N], sz[N], LVL[N];
ll h[N][20], s[N];
bool vis[N];
vector <ii> adj[N];
vector <int> ra;
int size(int u, int f){
sz[u] = 1;
for(auto p: adj[u]){
if(p.ff != f and !vis[p.ff]) sz[u] += size(p.ff, u);
}
return sz[u];
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

factories.cpp: In function 'll get(int)':
factories.cpp:79:18: error: request for member 'empty' in 's[u]', which is of non-class type 'll' {aka 'long long int'}
   79 |         if(!s[u].empty()){
      |                  ^~~~~
factories.cpp:80:51: error: request for member 'begin' in 's[u]', which is of non-class type 'll' {aka 'long long int'}
   80 |             ans = min(ans, h[aux][LVL[u]] + *s[u].begin());
      |                                                   ^~~~~