ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#212746 | #3829. C | wushuyu | Compile Error | / | / | Pascal | 423b | 2024-10-20 10:26:05 | 2024-10-20 12:40:59 |
answer
#include<bits/stdc++.h>
using namespace std;
vector <long long > tree[100001];
long long n,ma;
void sss(long long n)
{
if(tree[n].size()==0)
return ;
if(n!=1)
ma+=tree[n].size()-1;
for(long long i=0;i<tree[n].size();i++)
sss(tree[n][i]);
return ;
}
int main()
{
cin>>n;
ma=n-1;
while(--n)
{
long long u,v;
cin>>u>>v;
tree[u].push_back(v);
}
sss(1);
cout<<ma;
return 0;
}
详细
Free Pascal Compiler version 2.6.2-8 [2014/01/22] for x86_64 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling answer.code answer.code(1,1) Error: Illegal char constant answer.code(1,2) Fatal: Syntax error, "BEGIN" expected but "const string" found Fatal: Compilation aborted Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)