# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159728 | Doda | Tarifa (COCI16_tarifa) | C++14 | 6 ms | 376 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 x,n,p,a,b,y;
cin >> y >> n ;
x = y;
for (int i = 0; i<n ; i++){
cin >> p;
x = y;
x+= a;
a = 0;
if (p<x){
a += x-p ;
}
}
cout << a+y;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |