Submission #803663

#TimeUsernameProblemLanguageResultExecution timeMemory
803663vjudge1Self Study (JOI22_ho_t2)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define fi first #define se second #define ll long long using namespace std ; const ll N = 3e5 ; ll n, m, l = 0, r = 1e18, a[N + 1], b[N + 1] ; signed main() { ios_base::sync_with_stdio( 0 ) ; cin.tie( 0 ) ; cout.tie( 0 ) ; cin >> n >> m ; for(ll i = 1 ; i <= n ; i++) cin >> a[i] ; for(ll i = 1 ; i <= n ; i++) cin >> b[i] ; if(m == 1) { ll mn = 1e18 ; for(int i = 1 ; i <= n ; i++) mn = min(mn, max(a[i], b[i])) ; cout << mn << '\n' ; return 0 ; } while(l + 1 < r) { ll mid = (l + r) >> 1 ; for(int i = 1 ; i <= n ; i++) if(a[i] > b[i]) { } else { } if(flag) r = mid ; else l = mid ; } cout << l ; return 0 ; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:36:12: error: 'flag' was not declared in this scope
   36 |         if(flag)
      |            ^~~~