Codeforces Codeforces Round #367 (Div. 2) B. Interesting drink
// Accepted Code Link: B. Interesting drink // Mnaual //#include<stdio.h> //#include<iostream> //#include<algorithm> //#include<vector> //#include<cstring> //#include<cmath> //#include<map> #include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false) #define outs(x) cout << x << " " #define outn(x) cout << x << "\n" #define sf scanf #define pf printf #define high 1000010 typedef long long LL; typedef vector<LL>vll; vll ar; //upper bound LL khoj(LL lo, LL hi, LL itm) { LL mid; while(lo <= hi) { mid = (lo + hi) / 2; if(ar[mid] == itm) lo = mid+1; else if(ar[mid] > itm) hi = mid - 1; else if(ar[mid] < itm) lo=mid+1; } ...