Submission #479010

# Submission time Handle Problem Language Result Execution time Memory
479010 2021-10-09T11:56:08 Z kshitij_sodani Newspapers (CEOI21_newspapers) C++14
0 / 100
3 ms 4940 KB
//#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define mp make_pair
#define pb push_back
#define a first 
#define b second
#define endl '\n'
vector<int> adj[200001];
int dp[200001];
int co[200001];
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int n,m;
	cin>>n>>m;
	for(int i=0;i<m;i++){
		int aa,bb;
		cin>>aa>>bb;
		aa--;
		bb--;
		adj[aa].pb(bb);
		adj[bb].pb(aa);
	}
	if(m!=n-1){
		cout<<"NO"<<endl;
	}
	else{
		cout<<"YES"<<endl;
	}
/*	if(n==1){
		cout<<"YES"<<endl;
		cout<<"1"<<endl;
		cout<<"1"<<endl;
	}
	else if(n==2){
		cout<<"YES"<<endl;
		cout<<"2"<<endl;
		cout<<"1 1"<<endl;
	}
	else if(n==3){
		cout<<"YES"<<endl;
		cout<<"2"<<endl;
		cout<<"2 2"<<endl;
	}
	else{
		cout<<"NO"<<endl;
	}

*/

 
 
 
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 4940 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 4940 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 4940 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -