# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
941093 |
2024-03-08T06:54:15 Z |
Pring |
Self Study (JOI22_ho_t2) |
C++17 |
|
0 ms |
0 KB |
#include <bits/stdc++.h>
#pragma GCC optimize("O3","unroll-loops")
#pragma GCC target("avx2","popcnt")
using namespace std;
#ifdef MIKU
#define debug(x...) cout << '[' << #x << "] : ", dout(x)
void dout() { cout << endl; }
template <typename T, typename ...U>
void dout(T t, U ...u) { cout << t << (sizeof...(u) ? ", " : ""); dout(u...); }
#else
#define debug(...) 39
#endif
#define int long long
#define fs first
#define sc second
#define mp make_pair
#define FOR(i, j, k) for (int i = j, Z = k; i < Z; i++)
typedef pair<int, int> pii;
const int MXN = 300005;
int n, m, a[MXN], b[MXN];
void miku() {
cin >> n >> m;
FOR(i, 0, n) cin >> a[i];
FOR(i, 0, n) cin >> b[i];
FOR(i, 0, n) ans = min(ans, max(a[i], b[i]));
cout << ans << '\n';
}
int32_t main() {
cin.tie(0) -> sync_with_stdio(false);
cin.exceptions(cin.failbit);
miku();
return 0;
}
Compilation message
Main.cpp: In function 'void miku()':
Main.cpp:29:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
29 | FOR(i, 0, n) ans = min(ans, max(a[i], b[i]));
| ^~~
| abs
Main.cpp:30:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
30 | cout << ans << '\n';
| ^~~
| abs