/in/foo.cc:6:15: error: expected initializer before numeric constant
const int INF 1e9;
^~~
/in/foo.cc: In function 'void update(int, int)':
/in/foo.cc:25:6: error: 'now' was not declared in this scope
if (now.dis + i->dis < dis[i->id]) Q.push(node(i->id, dis[i->id] = now.dis + i->dis));
^~~
/in/foo.cc:25:16: error: 'i' was not declared in this scope
if (now.dis + i->dis < dis[i->id]) Q.push(node(i->id, dis[i->id] = now.dis + i->dis));
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:41:12: error: 'INF' was not declared in this scope
dis[i] = INF;
^~~
/in/foo.cc:54:28: error: 'INF' was not declared in this scope
ans = max(ans, dis[i] == INF ? 0 : dis[i]);
^~~