Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main(){
- ios_base::sync_with_stdio(0), cin.tie(0);
- // freopen("hgs.in", "r", stdin);
- int n;
- cin >> n;
- int a, b;
- int win1 = 0;
- int win2 = 0;
- for(int i=0; i<n; i++){
- cin >> a >> b;
- if(a==1 && b==2){
- win1++;
- }else if(a==2 && b==3){
- win1++;
- }else if(a==3 && b==1){
- win1++;
- }else if(a==1 && b==3){
- win2++;
- }else if(a==3 && b==2){
- win2++;
- }else if(a==2 && b==1){
- win2++;
- }
- }
- cout << max(win1, win2) << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement