Submission #803663

# Submission time Handle Problem Language Result Execution time Memory
803663 2023-08-03T05:21:59 Z vjudge1 Self Study (JOI22_ho_t2) C++14
Compilation error
0 ms 0 KB
#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

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