Compile Error

/in/foo.cc:6:1: error: expected initializer before 'struct'
    6 | struct node
      | ^~~~~~
/in/foo.cc:10:2: error: 'a' does not name a type
   10 | }a[N];
      |  ^
/in/foo.cc: In function 'void dfs(std::string, long long int)':
/in/foo.cc:18:23: error: 'a' was not declared in this scope
   18 |                 if(s==a[i].st&&!vis[i])
      |                       ^
/in/foo.cc:18:33: error: 'vis' was not declared in this scope
   18 |                 if(s==a[i].st&&!vis[i])
      |                                 ^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:31:35: error: 'a' was not declared in this scope
   31 |         for(int i=0;i<n;i++) cin>>a[i].st>>a[i].ed>>a[i].p;
      |                                   ^

信息

递交者
类型
递交
题目
P2922 考古遗址的文物拼接 pta202505T2
语言
C++
递交时间
2026-11-01 06:10:42
评测时间
2026-11-01 06:10:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes