hihoCoder太阁最新面经算法竞赛4 register

Ended

Participants:109

Verdict:Accepted
Score:100 / 100
Submitted:2016-06-14 23:27:02

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include<bits/stdc++.h>
using namespace std;
int main(){
    int cas;
    cin>>cas;
    while(cas--){
        int n,m;
        cin>>n>>m;
        for(int i = 0; i < m; i++){
            int a, b;
            cin>>a>>b;
        }
        if(n - m == 1)
            cout<<"YES";
        else
            cout<<"NO";
        cout<<endl;
    }
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX