F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39470549_22795.cpp:1:13: error: 'd2' does not name a type
    1 |             d2[u] = 2;
      |             ^~
0_0_39470549_22795.cpp:2:13: error: 'd3' does not name a type
    2 |             d3[u] = adj[u].size() - 2;
      |             ^~
0_0_39470549_22795.cpp:3:9: error: expected declaration before '}' token
    3 |         }
      |         ^
0_0_39470549_22795.cpp:4:14: error: 'vector' in namespace 'std' does not name a template type
    4 |         std::vector<std::pair<int, int>> tmp = {{}};
      |              ^~~~~~
0_0_39470549_22795.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
  +++ |+#include <vector>
    1 |             d2[u] = 2;
0_0_39470549_22795.cpp:5:9: error: expected unqualified-id before 'for'
    5 |         for (int v : adj[u]) {
      |         ^~~
0_0_39470549_22795.cpp:10:9: error: expected unqualified-id before 'if'
   10 |         if (tmp.size() == 1) return;
      |         ^~
0_0_39470549_22795.cpp:11:18: error: expected constructor, destructor, or type conversion before '(' token
   11 |         std::sort(tmp.begin(), tmp.end(), cmp);
      |                  ^
0_0_39470549_22795.cpp:12:9: error: 'd2' does not name a type
   12 |         d2[u] += tmp[0].first;
      |         ^~
0_0_39470549_22795.cpp:13:9: error: 'd3' does not name a type
   13 |         d3[u] += tmp[0].second;
      |         ^~
0_0_39470549_22795.cpp:14:9: error: 'anss' does not name a type
   14 |         anss.emplace_back(d2[u] + tmp[1].first, d3[u] + tmp[1].second);
      |         ^~~~
0_0_39470549_22795.cpp:15:5: error: expected declaration before '}' token
   15 |     };
      |     ^
0_0_39470549_22795.cpp:16:8: error: expected constructor, destructor, or type conversion before '(' token
   16 |     dfs(dfs, 0, -1);
      |        ^
0_0_39470549_22795.cpp:17:14: error: expected constructor, destructor, or type conversion before '(' token
   17 |     std::sort(anss.begin(), anss.end(), cmp);
      |              ^
0_0_39470549_22795.cpp:18:5: error: 'i64' does not name a type
   18 |     i64 ans = (2 + anss[0].first * pw(2, m) % MOD + anss[0].second * (pw(2, m + 1) % MOD - 1)) % MOD;
      |     ^~~
0_0_39470549_22795.cpp:19:10: error: 'cout' in namespace 'std' does not name a type
   19 |     std::cout << ans << "\n";
      |          ^~~~
0_0_39470549_22795.cpp:1:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
  +++ |+#include <iostream>
    1 |             d2[u] = 2;


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-29 23:50:05, Gzip enabled