# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1018676 | 2024-07-10T08:22:11 Z | vjudge1 | Self Study (JOI22_ho_t2) | C++17 | 47 ms | 13908 KB |
#include <bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define tobit(n) bitset<20>(n) //выводит 20 элементов в битовую систему #define all(v) (v).begin(), (v).end() #define rtt(v, k) rotate(v.begin(), v.begin() + k, v.end()); //move k elements back bool check(double m, vector<int> v, int L){ if(v[0] > m || (L - v.back()) > m) return false; for(int i = 1; i < v.size(); i++){ int d = v[i] - v[i - 1]; if (d > 2 * m) return false; } return true; } bool check(int m, int x, vector<int> v){ int sum = 0; for(int i = 0; i < v.size(); i++){ if(v[i] <= m) sum += (m - v[i]); } if(sum > x) return false; else return true; } signed main(){ int n, m, mn = 1e14; cin >> n >> m; vector<int> v(n), d(n); for(auto &to : v) cin >> to; for(auto &to : d) cin >> to; vector<int> res(n); for(int i = 0; i < n; i++){ res[i] = max(v[i], d[i]); } for(int i = 0; i < n; i++) mn = min(mn, res[i]); cout << mn; } // NEED TO FAST CIN && COUT // const int fastIO = [](){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }();
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 600 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 42 ms | 13192 KB | Output is correct |
12 | Correct | 46 ms | 13144 KB | Output is correct |
13 | Correct | 36 ms | 11156 KB | Output is correct |
14 | Correct | 33 ms | 11088 KB | Output is correct |
15 | Correct | 1 ms | 348 KB | Output is correct |
16 | Correct | 20 ms | 8664 KB | Output is correct |
17 | Correct | 47 ms | 13908 KB | Output is correct |
18 | Correct | 44 ms | 13140 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 20 ms | 8664 KB | Output is correct |
3 | Correct | 47 ms | 13908 KB | Output is correct |
4 | Correct | 44 ms | 13140 KB | Output is correct |
5 | Incorrect | 0 ms | 344 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 600 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 42 ms | 13192 KB | Output is correct |
12 | Correct | 46 ms | 13144 KB | Output is correct |
13 | Correct | 36 ms | 11156 KB | Output is correct |
14 | Correct | 33 ms | 11088 KB | Output is correct |
15 | Incorrect | 0 ms | 344 KB | Output isn't correct |
16 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 600 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 42 ms | 13192 KB | Output is correct |
12 | Correct | 46 ms | 13144 KB | Output is correct |
13 | Correct | 36 ms | 11156 KB | Output is correct |
14 | Correct | 33 ms | 11088 KB | Output is correct |
15 | Incorrect | 0 ms | 344 KB | Output isn't correct |
16 | Halted | 0 ms | 0 KB | - |