Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
34306 武云帆 【S】T4 C++ 解答错误 0 84 MS 244 KB 297 2024-11-05 19:28:34

Tests(0/4):


#include<bits/stdc++.h> using namespace std; int main(){ //freopen("tree.in","r",stdin); //freopen("tree.out","w",stdout); int n; cin>>n; for(int i=1;i<n;i++){ int x,y; cin>>x>>y; } if(n%2==0) cout<<-1<<endl; else cout<<(n/2)+2<<endl; }


测评信息: