Submission #1110683

# Submission time Handle Problem Language Result Execution time Memory
1110683 2024-11-10T07:49:32 Z vjudge1 Tuna (COCI17_tuna) C++17
0 / 50
1 ms 336 KB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    int top = 0;
    cin>>t;
    for (int n = 0; n < t; ++n)
    {
        int a,b;
        cin>>a>>b;
        if (abs(a-b)>2)
        {
            int yeni;
            cin>>yeni;
            top += yeni;
        }
        else
        {
            if (a>b)
            {
                top += a;
            }
            else
            {
                top+=b;
            }
            
            
        }
        
        
    }
    cout<<top<<endl;
    
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -