# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110646 | 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 <iostream>
using namespace std;
int main()
{
int teklif = 0;
int fark = 0;
int toplam = 0;
scanf("%d %d",&teklif,&fark);
for(int i = 0;i < teklif; ++i){
int a = 0,b = 0;
scanf("%d %d",&a,&b);
if(abs(a - b) <= fark){
toplam += max(a,b);
}
else{
int c = 0;
scanf("%d",&c);
toplam += c;
}
}
printf("%d",toplam);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |