# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159796 | Doda | Tarifa (COCI16_tarifa) | C++98 | 3 ms | 504 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,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 ;
}
}
int q = a+y;
cout << q;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |