Submission details
Task:Golf
Sender:TLE
Submission time:2025-11-08 12:29:25 +0200
Language:C++ (C++17)
Status:READY
Result:ACCEPTED
Test results
testverdicttime
#1ACCEPTED0.00 sdetails
#2ACCEPTED0.00 sdetails
#3ACCEPTED0.00 sdetails
#4ACCEPTED0.00 sdetails
#5ACCEPTED0.00 sdetails
#6ACCEPTED0.00 sdetails

Code

#include <bits/stdc++.h>
#define fi first
#define se second
#define For(type, i, a, b) for (type i = (a); i <= (b); ++i)
#define endl '\n'
using namespace std;
 
typedef long long ll;
 
const ll maxN = 1e18;
const ll minN = -1e18;
const ll MOD = 1e9 + 7;
 
const ll limit = 1e3 + 5;
 
ll a[20], b[20], c[20];
    
void FastIn(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
}
 
void ReadIn(){
  For(int, i, 1, 18) cin >> a[i];
  For(int, i, 1, 18) cin >> b[i];
  For(int, i, 1, 18) cin >> c[i];
  
  
  ll resa = 0, resb = 0;
  For(int, i, 1, 18) {
      if (a[i] < 250) {
          resa += (b[i] + 3);
          resb += (c[i] + 3);
      } else if (a[i] >= 250 and a[i] < 470) {
          resa += (b[i] + 4);
          resb += (c[i] + 4);
      } else if (a[i] >= 470 and a[i] < 590) {
          resa += (b[i] + 5);
          resb += (c[i] + 5);
      } else {
          resa += (b[i] + 6);
          resb += (c[i] + 6);
      }
  }
  //cout << resa << ' ' << resb << endl;
  if (resa > resb) {
      cout << "Maija";
  } else if (resa < resb) {
      cout << "Uolevi";
  } else {
      cout << "Tie";
  }
}

int main(){
    FastIn();
    ReadIn();
}
// g++ -o output
// g++ D.cpp
// ./d.out

Test details

Test 1

Verdict: ACCEPTED

input
 159 168 193 218 170 221 158 2...

correct output
Tie

user output
Tie

Test 2

Verdict: ACCEPTED

input
 133 249 194 236  50  75 110 2...

correct output
Uolevi

user output
Uolevi

Test 3

Verdict: ACCEPTED

input
 137  87  55 236 159 239 137 1...

correct output
Maija

user output
Maija

Test 4

Verdict: ACCEPTED

input
  555   80  711  842  298  130...

correct output
Tie

user output
Tie

Test 5

Verdict: ACCEPTED

input
  968  902  552  181  973  857...

correct output
Maija

user output
Maija

Test 6

Verdict: ACCEPTED

input
  229   64  872  833  214  370...

correct output
Uolevi

user output
Uolevi