Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <iostream>
  3. #include <vector>
  4. using namespace std;
  5. int main()
  6. {
  7. int Max=0;
  8. int One=0;
  9. int Two=0;
  10. int Three=0;
  11. int Four=0;
  12. vector <string> Keep;
  13. string Name;
  14. for(int i=0;i<4;i++)
  15. {
  16. cin>>Name;
  17. Keep.push_back(Name);
  18. }
  19. int KeepNumber[4][4];
  20. for(int i=0;i<4;i++)
  21. {
  22. for(int j=0;j<4;j++)
  23. {
  24. cin>>KeepNumber[i][j];
  25.  
  26. }
  27. }
  28. for(int i=0;i<4;i++)
  29. {
  30. for(int j=0;j<4;j++)
  31. {
  32. if(i==j)
  33. {
  34. Max=Max+0;
  35. }
  36. else
  37. {
  38. if(i==0)
  39. {
  40. if(Keep[0][j]>Keep[j][0])
  41. {
  42. One=One+3;
  43. }
  44. else if(Keep[0][j]==Keep[j][0])
  45. {
  46. One+=1;
  47. }
  48. }
  49. else if(i==1)
  50. {
  51. if(Keep[1][j]>Keep[j][1])
  52. {
  53. Two+=3;
  54. }
  55. else if(Keep[1][j]==Keep[j][1])
  56. {
  57. Two+=1;
  58. }
  59. }
  60. else if(i==2)
  61. {
  62. if(Keep[2][j]>Keep[j][2])
  63. {
  64. Three+=3;
  65. }
  66. else if(Keep[2][j]==Keep[j][2])
  67. {
  68. Three+=1;
  69. }
  70. }
  71. else if(i==3)
  72. {
  73. if(Keep[3][j]>Keep[j][3])
  74. {
  75. Four+=3;
  76. }
  77. else if(Keep[3][j]==Keep[j][3])
  78. {
  79. Four+=1;
  80. }
  81. }
  82. }
  83.  
  84. }
  85. }
  86. cout<<One<<" "<<Two<<" "<<Three<<" "<<Four;
  87.  
  88.  
  89.  
  90.  
  91.  
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement