Contest Duration: - (local time) (100 minutes) Back to Home

Submission #20734525

Source Code Expand

Copy
```#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std;
void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
∧＿∧
∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
（ ´_ゝ`）　/　 ⌒i     @hamayanhamayan0
／　　　＼　 　  |　|
/　　 /￣￣￣￣/　　|
＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
＼/＿＿＿＿/　（u　⊃
---------------------------------------------------------------------------------------------------*/

int N, A[1010], B[1010];
//---------------------------------------------------------------------------------------------------
void _main() {
cin >> N;
rep(i, 0, N) cin >> A[i] >> B[i];

int ans = inf;
rep(a, 0, N) rep(b, 0, N) {
int cost;
if (a == b) cost = A[a] + B[b];
else cost = max(A[a], B[b]);
chmin(ans, cost);
}
cout << ans << endl;
}

```

#### Submission Info

Submission Time 2021-03-06 23:23:21+0900 B - Job Assignment hamayanhamayan C++ (GCC 9.2.1) 200 1661 Byte AC 8 ms 3660 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
 AC × 2
 AC × 21
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
handmade_00.txt AC 6 ms 3616 KB
handmade_01.txt AC 2 ms 3660 KB
handmade_02.txt AC 2 ms 3620 KB
handmade_03.txt AC 8 ms 3592 KB
handmade_04.txt AC 3 ms 3568 KB
random_00.txt AC 7 ms 3484 KB
random_01.txt AC 3 ms 3544 KB
random_02.txt AC 4 ms 3592 KB
random_03.txt AC 4 ms 3592 KB
random_04.txt AC 4 ms 3528 KB
random_05.txt AC 7 ms 3612 KB
random_duplicate_00.txt AC 5 ms 3548 KB
random_duplicate_01.txt AC 4 ms 3652 KB
random_duplicate_02.txt AC 3 ms 3648 KB
random_duplicate_03.txt AC 5 ms 3548 KB
sample_01.txt AC 2 ms 3544 KB
sample_02.txt AC 2 ms 3540 KB
single_00.txt AC 5 ms 3624 KB
single_01.txt AC 4 ms 3536 KB
single_02.txt AC 3 ms 3552 KB
single_03.txt AC 3 ms 3576 KB