結果
問題 | No.806 木を道に |
ユーザー |
![]() |
提出日時 | 2019-03-22 21:49:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 278 bytes |
コンパイル時間 | 1,444 ms |
コンパイル使用メモリ | 169,236 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-19 04:06:29 |
合計ジャッジ時間 | 3,062 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 WA * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main (){ int n,x; cin >> n; vector<int> v(n,0); for(int i=0;i<2*(n-1);i++){ cin >> x; v.at(x-1) += 1; }//input if(v.at(0)-2 <0){cout << 0 << endl;} else{cout << v.at(0)-2 << endl;} }