Submission #6637100


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
  for(auto &e:u) fill_v<T>(e,v...);
}


int main(void) {
    int64 N;
    int64 sum = 0, maxi = 0, l = INF_LL;
    cin >> N;
    REP(i, N) {
        int64 a, b;
        cin >> a >> b;
        sum += a;
        if (a >= b) chmin(l, b);
    }
    cout << sum - l << endl;
}

Submission Info

Submission Time
Task E - Tozan and Gezan
User maze1230
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1423 Byte
Status
Exec Time 24 ms
Memory 384 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 700
Status
× 3
× 29
× 6
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 30.txt, 31.txt, 32.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt 22 ms 256 KB
02.txt 22 ms 256 KB
03.txt 22 ms 256 KB
04.txt 22 ms 256 KB
05.txt 22 ms 256 KB
06.txt 22 ms 256 KB
07.txt 22 ms 256 KB
08.txt 22 ms 256 KB
09.txt 22 ms 256 KB
10.txt 22 ms 256 KB
11.txt 22 ms 256 KB
12.txt 22 ms 256 KB
13.txt 24 ms 256 KB
14.txt 24 ms 256 KB
15.txt 24 ms 256 KB
16.txt 24 ms 256 KB
17.txt 24 ms 384 KB
18.txt 24 ms 256 KB
19.txt 22 ms 256 KB
20.txt 22 ms 256 KB
21.txt 22 ms 256 KB
22.txt 22 ms 256 KB
23.txt 22 ms 256 KB
24.txt 22 ms 256 KB
25.txt 22 ms 256 KB
26.txt 22 ms 256 KB
27.txt 22 ms 256 KB
28.txt 22 ms 256 KB
29.txt 22 ms 256 KB
30.txt 22 ms 256 KB
31.txt 1 ms 256 KB
32.txt 1 ms 256 KB
s1.txt 1 ms 256 KB
s2.txt 1 ms 256 KB
s3.txt 1 ms 256 KB