답안 #348396

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
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


*/
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -