/ Vijos /

记录详情

Compile Error

foo.cc:2:13: error: ‘lon’ does not name a type; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:6:7: note: in expansion of macro ‘int’
    6 | const int N = 1e5 + 5;
      |       ^~~
foo.cc:2:13: error: ‘lon’ does not name a type; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:9:5: note: in expansion of macro ‘int’
    9 |     int u, v;
      |     ^~~
foo.cc:2:13: error: ‘lon’ does not name a type; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:10:5: note: in expansion of macro ‘int’
   10 |     int val;
      |     ^~~
foo.cc: In function ‘bool compare(Node, Node)’:
foo.cc:13:14: error: ‘struct Node’ has no member named ‘val’
   13 |     return x.val < y.val;
      |              ^~~
foo.cc:13:22: error: ‘struct Node’ has no member named ‘val’
   13 |     return x.val < y.val;
      |                      ^~~
foo.cc: At global scope:
foo.cc:2:13: error: ‘lon’ does not name a type; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:16:1: note: in expansion of macro ‘int’
   16 | int n, m;
      | ^~~
foo.cc:2:13: error: ‘lon’ does not name a type; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:18:1: note: in expansion of macro ‘int’
   18 | int prt[N];
      | ^~~
foo.cc:19:12: error: ‘N’ was not declared in this scope
   19 | Node graph[N];
      |            ^
foo.cc:2:13: error: ‘lon’ was not declared in this scope; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:21:9: note: in expansion of macro ‘int’
   21 | vector <int> dis;
      |         ^~~
foo.cc:21:12: error: template argument 1 is invalid
   21 | vector <int> dis;
      |            ^
foo.cc:21:12: error: template argument 2 is invalid
foo.cc:2:13: error: ‘lon’ does not name a type; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:23:1: note: in expansion of macro ‘int’
   23 | int GetFather(int u) {
      | ^~~
foo.cc:2:13: error: ‘lon’ does not name a type; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:30:1: note: in expansion of macro ‘int’
   30 | int Kruskal(int del, bool is_first) {
      | ^~~
foo.cc: In function ‘int main()’:
foo.cc:61:12: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
   61 |     cin >> n >> m;
      |            ^
      |            yn
foo.cc:61:17: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
   61 |     cin >> n >> m;
      |                 ^
      |                 tm
foo.cc:2:13: error: ‘lon’ was not declared in this scope; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:62:10: note: in expansion of macro ‘int’
   62 |     for (int i = 1; i <= m; ++ i) {
      |          ^~~
foo.cc:62:21: error: ‘i’ was not declared in this scope
   62 |     for (int i = 1; i <= m; ++ i) {
      |                     ^
foo.cc:63:16: error: ‘graph’ was not declared in this scope; did you mean ‘isgraph’?
   63 |         cin >> graph[i].u >> graph[i].v >> graph[i].val;
      |                ^~~~~
      |                isgraph
foo.cc:66:10: error: ‘graph’ was not declared in this scope; did you mean ‘isgraph’?
   66 |     sort(graph + 1, graph + 1 + m, compare);
      |          ^~~~~
      |          isgraph
foo.cc:2:13: error: ‘lon’ was not declared in this scope; did you mean ‘long’?
    2 | #define int lon long
      |             ^~~
foo.cc:68:5: note: in expansion of macro ‘int’
   68 |     int first_answer = Kruskal(-1, true), main_answer = INT_MAX;
      |     ^~~
foo.cc:71:20: error: ‘begin’ was not declared in this scope; did you mean ‘std::begin’?
   71 |     for (auto it : dis) {
      |                    ^~~
      |                    std::begin
In file included from stdc++.h:166:
/nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1238:5: note: ‘std::begin’ declared here
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
foo.cc:71:20: error: ‘end’ was not declared in this scope; did you mean ‘std::end’?
   71 |     for (auto it : dis) {
      |                    ^~~
      |                    std::end
/nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1265:5: note: ‘std::end’ declared here
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
foo.cc:2:17: error: expected ‘;’ before ‘long’
    2 | #define int lon long
      |                 ^~~~
foo.cc:72:9: note: in expansion of macro ‘int’
   72 |         int t = Kruskal(it, false);
      |         ^~~
foo.cc:74:13: error: ‘t’ was not declared in this scope; did you mean ‘tm’?
   74 |         if (t != -1)
      |             ^
      |             tm
foo.cc:75:13: error: ‘main_answer’ was not declared in this scope
   75 |             main_answer = min(main_answer, t), main_flag = true;
      |             ^~~~~~~~~~~
foo.cc:78:25: error: ‘first_answer’ was not declared in this scope
   78 |     cout << "Cost: " << first_answer << '\n';
      |                         ^~~~~~~~~~~~
foo.cc:80:29: error: ‘main_answer’ was not declared in this scope
   80 |         cout << "Cost: " << main_answer << '\n';
      |                             ^~~~~~~~~~~

信息

递交者
类型
递交
题目
P1070 新年趣事之游戏
语言
C++
递交时间
2025-07-23 08:37:48
评测时间
2025-07-23 08:37:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes