URI Solution 1397 Game of The Greatest - Solution in C++ | Ad Hoc
URI Online Judge Solution Game of The Greatest | Ad Hoc
URI Main Problem Link - https://www.urionlinejudge.com.br/judge/en/problems/view/1397
Problem Name: URI Problem Game of The Greatest
Problem Number : URI Problem 1397 Solution
Online Judge : URI Online Judge Solution
Level: Ad Hoc
Solution Language : C plus plus
URI Solution 1397 Code in CPP:
#include <iostream> using namespace std; int main() { int n, a, b; int counter_a, counter_b; while(cin >> n && n != 0) { counter_a = 0; counter_b = 0; for (int i = 0; i < n; ++i) { cin >> a >> b; if(a > b) counter_a++; if(a < b) counter_b++; } cout << counter_a << " " << counter_b << endl; } return 0; }
No comments:
Write commentsTo know more about the problem, give us your valuable commment. We'll try to help you. Thanks