Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- #include <vector>
- using namespace std;
- int main()
- {
- int Max=0;
- int One=0;
- int Two=0;
- int Three=0;
- int Four=0;
- vector <string> Keep;
- string Name;
- for(int i=0;i<4;i++)
- {
- cin>>Name;
- Keep.push_back(Name);
- }
- int KeepNumber[4][4];
- for(int i=0;i<4;i++)
- {
- for(int j=0;j<4;j++)
- {
- cin>>KeepNumber[i][j];
- }
- }
- for(int i=0;i<4;i++)
- {
- for(int j=0;j<4;j++)
- {
- if(i==j)
- {
- Max=Max+0;
- }
- else
- {
- if(i==0)
- {
- if(Keep[0][j]>Keep[j][0])
- {
- One=One+3;
- }
- else if(Keep[0][j]==Keep[j][0])
- {
- One+=1;
- }
- }
- else if(i==1)
- {
- if(Keep[1][j]>Keep[j][1])
- {
- Two+=3;
- }
- else if(Keep[1][j]==Keep[j][1])
- {
- Two+=1;
- }
- }
- else if(i==2)
- {
- if(Keep[2][j]>Keep[j][2])
- {
- Three+=3;
- }
- else if(Keep[2][j]==Keep[j][2])
- {
- Three+=1;
- }
- }
- else if(i==3)
- {
- if(Keep[3][j]>Keep[j][3])
- {
- Four+=3;
- }
- else if(Keep[3][j]==Keep[j][3])
- {
- Four+=1;
- }
- }
- }
- }
- }
- cout<<One<<" "<<Two<<" "<<Three<<" "<<Four;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement