#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define double long double
#define print(a) for(auto x : a) cout << x << " "; cout << endl
const int M = 1000000007;
const int N = 3e5+9;
const int INF = 2e9+1;
const int LINF = 2000000000000000001;
inline int power(int a, int b, int mod=M) {
int x = 1;
a %= mod;
while (b) {
if (b & 1) x = (x * a) % mod;
a = (a * a) % mod;
b >>= 1;
}
return x;
}
//_ ***************************** START Below *******************************
vector<int> a;
// ---------- set ----------
// Strict Ceil (> x)
int sCeil(set<int> &s, int x){
auto it = s.upper_bound(x);
if(it == s.end()) return -1;
return *it;
}
// Strict Floor (< x)
int sFloor(set<int> &s, int x){
auto it = s.lower_bound(x);
if(it == s.begin()) return -1;
--it;
return *it;
}
// Loose Ceil (>= x)
int ceil(set<int> &s, int x){
auto it = s.lower_bound(x);
if(it == s.end()) return -1;
return *it;
}
// Loose Floor (<= x)
int floor(set<int> &s, int x){
auto it = s.upper_bound(x);
if(it == s.begin()) return -1;
--it;
return *it;
}
void solve() {
set<int> st = {2, 5, 3, 6, 10, 22};
cout << "Set => ";
for(auto& s : st) cout << s << " "; cout << endl;
int x = 6;
cout << "Smallest(" << x << ") : " << *st.begin() << endl;
cout << "Largest(" << x << ") : " << *st.rbegin() << endl;
cout << "Strict Ceil (>" << x << ") : " << sCeil(st, x) << endl;
cout << "Strict Floor (<" << x << ") : " << sFloor(st, x) << endl;
cout << "Loose Ceil (>=" << x << ") : " << ceil(st, x) << endl;
cout << "Loose Floor(<=" << x << ") : " << floor(st, x) << endl;
}
int32_t main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}