Submission #921485

# Submission time Handle Problem Language Result Execution time Memory
921485 2024-02-04T01:53:01 Z LiuBruh Self Study (JOI22_ho_t2) C++17
10 / 100
48 ms 11348 KB
/***
 * Sub2: Binary Search
*/
#include <bits/stdc++.h>

#define int long long
#define sz(v) (int)v.size()
using namespace std;

const int maxn = (int)3e5 + 5;
const int INF = (int)1e18 + 5;

int n, m;
int a[maxn], b[maxn];

void sub1() {
    int mi = INF;
    for (int i = 1; i <= n; i++) {
        mi = min(mi, max(a[i], b[i]));
    }
    cout << mi << '\n';
}
void sub2() {
    
}

void solve() {
    cin >> n >> m;
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 1; i <= n; i++) cin >> b[i];

    if (m == 1) sub1();
    else sub2();
}

signed main() {
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);

    solve();

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2648 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 47 ms 8532 KB Output is correct
12 Correct 47 ms 10832 KB Output is correct
13 Correct 36 ms 8696 KB Output is correct
14 Correct 35 ms 8832 KB Output is correct
15 Correct 1 ms 2392 KB Output is correct
16 Correct 26 ms 6280 KB Output is correct
17 Correct 48 ms 11348 KB Output is correct
18 Correct 47 ms 10836 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 26 ms 6280 KB Output is correct
3 Correct 48 ms 11348 KB Output is correct
4 Correct 47 ms 10836 KB Output is correct
5 Incorrect 1 ms 2392 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2648 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 47 ms 8532 KB Output is correct
12 Correct 47 ms 10832 KB Output is correct
13 Correct 36 ms 8696 KB Output is correct
14 Correct 35 ms 8832 KB Output is correct
15 Incorrect 1 ms 2392 KB Output isn't correct
16 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2648 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 47 ms 8532 KB Output is correct
12 Correct 47 ms 10832 KB Output is correct
13 Correct 36 ms 8696 KB Output is correct
14 Correct 35 ms 8832 KB Output is correct
15 Incorrect 1 ms 2392 KB Output isn't correct
16 Halted 0 ms 0 KB -