Advertisement
askarulytarlan

#5 Статистика

Mar 26th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <vector>
  5. #include <algorithm>
  6. #include <cstdio>
  7. #include <math.h>
  8. #include <string>
  9. #include <stdio.h>
  10. #include <string.h>
  11. #include <string>
  12. #include <stdlib.h>
  13. #include <cmath>
  14. #include <iomanip>
  15. #include <queue>
  16. #include <utility>
  17. #include <vector>
  18. #include <stack>
  19. #include <list>
  20. #include <iterator>
  21. #include <cctype>
  22. #include <exception>
  23. #include <cstdlib>
  24. #include <stdexcept>
  25. #include <csignal>
  26. #include <pthread.h>
  27.  
  28. using namespace std;
  29.  
  30. int main(int argc, const char * argv[]) {
  31. int days;
  32. int vasya[3000];
  33. int countFour;
  34. int countThree;
  35. countFour=0;
  36. countThree=0;
  37. cin>>days;
  38. for(int i=0; i<days;i++){
  39. cin>>vasya[i];
  40. }
  41. for(int i=0; i<days;i++){
  42. if (vasya[i]%2!=0){
  43. cout<<vasya[i]<<" ";
  44. countThree=countThree+1;
  45. }
  46. }
  47. cout<<endl;
  48. for(int i=0; i<days;i++){
  49. if (vasya[i]%2==0){
  50. cout<<vasya[i]<<" ";
  51. countFour=countFour+1;
  52. }
  53. }
  54. cout<<endl;
  55. if (countFour>=countThree){
  56. cout<<"YES"<<endl;
  57. }
  58. else{
  59. cout<<"NO"<<endl;
  60. }
  61. return 0;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement