CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 01:02:44 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=2cd746a453ce8682ba9837887e423903275c61b25424b6e893ba6d842ba89df7a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22ub_JXSImVlXO_dcfFSI2tZxl7LIiDARq%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2ac682bc0a8b0-BLR
SORT BINARY - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int j,t,i,m,n,Arr[110],Ub,Lb=0,mid;
- cin>>n;
- for(i=0; i<n; i++)
- {
- cin>>Arr[i];
- }
- Ub=n-1;
- for(i=0; i<n; i++)
- {
- for(j=0 ; j<n-1; j++)
- {
- if(Arr[j]>Arr[j+1])
- {
- t=Arr[j];
- Arr[j]=Arr[j+1];
- Arr[j+1]=t;
- }
- }
- }
- cout<<"Search" << endl;
- cin>>m;
- while(Lb<=Ub)
- {
- mid=(Lb+Ub)/2;
- if(m==Arr[mid])
- {break;}
- else if(m>Arr[mid])
- {
- Lb=mid+1;
- }
- else if (m<Arr[mid])
- {
- Ub=mid-1;
- }
- }
- if(Lb<=Ub)
- cout<<"Yes";
- else
- cout<<"NO";
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
📝 MAKE $2500 IN 15 MIN ✅ Working
JavaScript | 9 sec ago | 0.24 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 29 sec ago | 0.24 KB
-
📌 Swapzone +37% glitch
JavaScript | 38 sec ago | 0.24 KB
-
📝 Exchange profit method
JavaScript | 47 sec ago | 0.24 KB
-
📌 Swapzone +37% glitch ⭐ 6
JavaScript | 49 sec ago | 0.25 KB
-
⭐ Free Crypto Method ⭐
JavaScript | 57 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ C
JavaScript | 58 sec ago | 0.25 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand