# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110683 | vjudge1 | Tuna (COCI17_tuna) | C++17 | 1 ms | 336 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |