-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBOJ2617.cpp
58 lines (58 loc) · 1.15 KB
/
BOJ2617.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
////
//// Created by 전형진 on 2019-04-15.
////
//#include <stdio.h>
//#include <vector>
//#include <queue>
//
//using namespace std;
//
//int bigNode[100];
//int smallNode[100];
//int n;
//int m;
//int times[100];
//int cnt=0;
//
//vector<int>v[100];
//
//void bfs(int i){
// for (int j = 1; j <=n; ++j) {
// times[j] =0;
// }
// queue<int> q;
// int small=0;
// q.push(i);
//
// while(!q.empty()){
// int x = q.front();
// q.pop();
// for(int a=0;a<v[x].size();a++){
// int nx = v[x][a];
// if(times[nx] == 0){
// bigNode[nx]++;
// small++;
// times[nx] = 1;
// q.push(nx);
// }
// }
// }
// smallNode[i] = small;
//}
//int main(){
// int a,b;
// scanf("%d %d",&n,&m);
// for(int i=0;i<m;i++){
// scanf("%d %d",&a,&b);
// v[a].push_back(b);
// }
// for(int i=1;i<=n;i++){
// bfs(i);
// }
// cnt=0;
// for(int i=1;i<=n;i++){
// if(bigNode[i] >= ((n+1)/2) || smallNode[i] >= ((n+1)/2))
// cnt++;
// }
// printf("%d",cnt);
//}