QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#180069#2169. 'S No ProblemAlleks_BCompile Error//C++14320b2023-09-15 15:18:572023-09-15 15:18:58

Judging History

你现在查看的是最新测评结果

  • [2023-09-15 15:18:58]
  • 评测
  • [2023-09-15 15:18:57]
  • 提交

answer

#include <bits/stdc++.h>
#define L 100005
using namespace std;

int n;
vector <pair <int, int>> G[L];
int root = 1;

int main(){
  cin >> n;
  for (int i = 1; i < n; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    G[a].push_back({b, c});
    G[b].push_back({a, c});
  }
  DFS(root);
  return 0;
}

詳細信息

answer.code: In function ‘int main()’:
answer.code:17:3: error: ‘DFS’ was not declared in this scope
   17 |   DFS(root);
      |   ^~~