| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 211766 | goodboy | Potatoes and fertilizers (LMIO19_bulves) | C++14 | 158 ms | 7064 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 <stdio.h> 
#include <math.h>
using namespace std;
 
int main() {
    int n , a , b , prefix = 0;
    scanf("%d",&n);
	long long ans = 0;
    for (int i = 1; i <= n; i++) {
    	scanf("%d%d",&a,&b);
      	prefix += (a-b);
      	ans += abs(prefix);
  	}
  	printf("%lld\n",ans);
  	return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
