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