Submission #348396

# Submission time Handle Problem Language Result Execution time Memory
348396 2021-01-14T21:55:49 Z EIMONIM Potatoes and fertilizers (LMIO19_bulves) C++14
0 / 100
1 ms 364 KB
#include <bits/stdc++.h>
#define int int64_t
#define ii pair<int,int>
#define x first
#define y second
#define vi vector<int>
#define vvi vector<vi>
#define vii vector<ii>
#define vvii vector<vii>
#define vb vector<bool>
#define vvb vector<vb>
#define pb push_back
#define loop(i,s,e) for(int i=(s);i<(e);i++)
#define loopr(i,s,e) for(int i=(e)-1;i>=(s);i--)
#define chkmax(a,b) a = max(a,b)
#define chkmin(a,b) a=min(a,b)
#define all(x) x.begin(),x.end()
using namespace std;
const int INF = 1e18;
const int MOD = (int(1)<<31) - 1;


int32_t main(){
    ios_base::sync_with_stdio(false);
    int n; cin>>n;
    int c = 0, ans = 0,a,b;
    loop(i,0,n){
        cin>>a>>b;
        c+=a-b;
        ans+=abs(c);
    }
    cout<<c<<endl;
    return 0;
}
/*
color a
cls
g++ CuttingRectangle.cpp -o a & a


*/
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -