比赛 |
20151026 |
评测结果 |
WWWWWWWWWW |
题目名称 |
游历校园 |
最终得分 |
0 |
用户昵称 |
GoodPersonBossHe |
运行时间 |
0.268 s |
代码语言 |
C++ |
内存使用 |
0.73 MiB |
提交时间 |
2015-10-26 20:29:09 |
显示代码纯文本
- #include<iostream>
- #include<cstdlib>
- #include<cstdio>
- #include<cmath>
- using namespace std;
- inline void _read(int &d)
- {
- char t=getchar();bool f=false;
- while(t<'0'||t>'9'){if(t=='-')f=true;t=getchar();}
- for(d=0;t>='0'&&t<='9';t=getchar())d=d*10+t-'0';
- if(f==true)d=-d;
- }
- int n,m;
- int du[110000];
- int main()
- {
- freopen("sent.in","r",stdin);
- freopen("sent.out","w",stdout);
- int a,b,c,d,e;
- _read(n);_read(m);
- for(a=1;a<=m;a++)
- {
- _read(b);_read(c);
- du[b]++;du[c]++;
- }
- int tot=0;
- for(a=1;a<=n;a++){du[a]%2==1;tot++;}
- cout<<tot/2-1;
- return 0;
- }