ShaysXIA/CodeInsightBench huggingface dataset:
Problem: 2057B - Gorilla and the Exam
Language: c++17 

Code 1:
#include <bits/stdc++.h>
using namespace std;
int main() {
    int t;cin >> t;
    while(t--){
        int n;cin >> n;
        int k;cin >> k;
        vector<int> v(n);
        unordered_map<int,int> m;
        for(int i=0;i<n;i++){
            cin >> v[i];
            m[v[i]]++;
        }
        vector<int> a;
        for(auto m:m){
            a.push_back(m.second);
        }
        sort(a.begin(),a.end());
        int count=0;
        for(int i=0;i<a.size();i++){
            k-=a[i];
            count++;
            if(k<0) break;
        }
        cout << a.size()-count+1 << endl;
    }
    return 0;
}

Code 2:
#include <bits/stdc++.h>
using namespace std;

void solve() {
    int n, k;
    cin >> n >> k;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }
    sort(v.begin(), v.end());
    vector<int> cnt = {1};
    for (int i = 1; i < n; i++) {
        if (v[i] == v[i - 1]) {
            cnt.back()++;
        } else {
            cnt.push_back(1);
        }
    }
    sort(cnt.begin(), cnt.end());
    int m = cnt.size();
    for (int i = 0; i < m - 1; i++) {
        if (cnt[i] > k) {
            cout << m - i << "\n";
            return;
        }
        k -= cnt[i];
    }
    cout << 1 << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}


Answer: 2
Problem: 2057B - Gorilla and the Exam
Language: c++23 

Code 1:
#include<bits/stdc++.h>

using namespace std;

using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;

void solve() {
    int n, k;
    cin >> n >> k;

    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }

    map<int, int> freqMap;
    for (int i = 0; i < n; ++i) {
        freqMap[a[i]]++;
    }

    vector<pair<int, int> > freq(freqMap.begin(), freqMap.end());
    sort(freq.begin(), freq.end(), [](const auto &left, const auto &right) {
        return left.second < right.second;
    });

    int ans = freq.size();
    for (const auto &[_, count]: freq) {
        if (k == 0) break;
        if (count <= k) {
            k -= count;
            --ans;
        }
    }

    if (ans == 0) ++ans;

    cout << ans << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    cin >> t;
    while (t--) {
        solve();
    }

    return 0;
}


Code 2:
#include<bits/stdc++.h>

using namespace std;

using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;

void solve() {
    int n, k;
    cin >> n >> k;

    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }

    unordered_map<int, int> freqMap;
    for (int i = 0; i < n; ++i) {
        freqMap[a[i]]++;
    }

    vector<pair<int, int> > freq(freqMap.begin(), freqMap.end());
    sort(freq.begin(), freq.end(), [](const auto &left, const auto &right) {
        return left.second < right.second;
    });

    int ans = freq.size();
    for (const auto &[_, count]: freq) {
        if (k == 0) break;
        if (count <= k) {
            k -= count;
            --ans;
        }
    }

    if (ans == 0) ++ans;

    cout << ans << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    cin >> t;
    while (t--) {
        solve();
    }

    return 0;
}


Answer: 1
Problem: 2057B - Gorilla and the Exam
Language: c++20 

Code 1:
#include <bits/stdc++.h>
using namespace std;
int main(){
    
    int t ;
    cin>>t;
    while(t--)
    {
        int n ,k;
        cin>>n>>k;
       int temp ; 
       map<int,int>mp;
       for(int i= 0 ; i<n ; i++)
       {
           cin>>temp;
           mp[temp]++;
       }
       
       vector<int>v;
       for(auto it : mp)
       v.push_back(it.second);
       sort(v.begin(),v.end());
       int ans = v.size();
       
       for(int i = 0 ; i<v.size() ; i++)
       {
           k-=v[i];
           if(k<0)
           break;
           
           ans--;
          
       }
       cout<<max(ans,1)<<endl;
       
       
        
    }
    
    
return 0;
    
    
}

Code 2:
#include <bits/stdc++.h>
using namespace std;
int main(){
    
    int t ;
    cin>>t;
    while(t--)
    {
        int n ,k;
        cin>>n>>k;
       int temp ; 
       map<int,int>mp;
       for(int i= 0 ; i<n ; i++)
       {
           cin>>temp;
           mp[temp]++;
       }
       
       vector<int>v;
       for(auto &it : mp)
       v.push_back(it.second);
       sort(begin(v),end(v));
       int ans = v.size();
       
       for(int i = 0 ; i<n ; i++)
       {
           k-=v[i];
           if(k<=0)
           break;
           
           ans--;
          
       }
       cout<<max(ans,1)<<endl;
       
       
        
    }
    
    

    
    
}

Answer: 1
Problem: 2057B - Gorilla and the Exam
Language: c++23 

Code 1:
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

int main(){
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int c; cin >> c;
    while(c--){
        int n, k;
        cin >> n >> k;
        vector<int> arr;
        for (int i = 0; i < n; i++){int tmp; cin >> tmp; arr.push_back(tmp);}
        // put into groups that can be removed together
        // minimize groups
        // groups are contigous seperated by lower numbers
        // for each number store group (what information about the group. indexes? l and r of range. )
        // we need to store the amount of members of each group, and an arr of the locations (and thus the range)
        vector<int> numArr;
        unordered_map<int, int> numNums;
        for (int i : arr){
            if (numNums.count(i)) { 
                (numNums[i] += 1);
            } else {
                numNums[i] = 1;
                numArr.push_back(i);


            }
        }
        vector<int> amtNums;
        for (int i : numArr){amtNums.push_back(numNums[i]);}
        sort(amtNums.begin(), amtNums.end());
        int groupsRmed = 0;
        for (int i : amtNums){
            k -= i;
            if (k < 0){
                break;
            } else {
                groupsRmed++;


            }
        }
        int res = (size(numArr) - groupsRmed != 0) ? (size(numArr) - groupsRmed) : 1;
        cout << res << "\n";
        







    }
}


Code 2:
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

int main(){
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int c; cin >> c;
    while(c--){
        int n, k;
        cin >> n >> k;
        vector<int> arr;
        for (int i = 0; i < n; i++){int tmp; cin >> tmp; arr.push_back(tmp);}


        sort(arr.begin(), arr.end());
        // apearances, num
        vector<pair<int, int>> numUnique;
        int currApperances = 0;
        int last = arr[0];
        for (int i : arr){
            if (i == last){
                currApperances++;
            } else {
                numUnique.emplace_back(currApperances, last);
                currApperances = 1;
                last = i;
            }
        }
        numUnique.emplace_back(currApperances, last);

        sort(numUnique.begin(), numUnique.end());
        int removals = 0;
        for (pair<int, int> i : numUnique){
            k -= i.first;
            if (k < 0){
                break;
            }
            else{
                removals++;
            }
        }
        int res = (size(numUnique) - removals != 0) ? size(numUnique) - removals : 1;
        cout << res << "\n";

        

    }
}


Answer: 2
Problem: 2057B - Gorilla and the Exam
Language: c++20 

Code 1:
#include<bits/stdc++.h>
using namespace std;
bool comp(pair<int,int>a,pair<int,int>b){
    if(a.second<b.second) return true;
    return false;
}
int main(){
    int t;
    cin>>t;
    while(t--){
        int n,k;
        cin>>n>>k;
        int l[n];
        vector<pair<int,int>>m;
        for(int i=0;i<n;i++){
            cin>>l[i];
        }
        sort(l,l+n);
        int say=1;
        for(int i=1;i<=n;i++){
            if(l[i]==l[i-1]){
                say++;
            }
            else{
                m.push_back({l[i-1],say});
                say=1;
            }

        }

        sort(m.begin(),m.end(),comp);
        for(auto& p:m){
            if(k==0){
                break;
            }
            if(k>=p.second){
                k-=p.second;
                p.second=0;

            }
            else{
                p.second-=k;
                k=0;
                break;
            }
        }
        int cvb=0;
        for(pair<int,int>p:m){
           // cout<<p.first<<" "<<p.second<<endl;
            if(p.second!=0){
                cvb++;
            }

        }
        if(cvb==0) cvb=1;
        cout<<cvb<<endl;


    }
}


Code 2:
#include<bits/stdc++.h>
using namespace std;
bool comp(pair<int,int>a,pair<int,int>b){
    if(a.second<b.second) return true;
    return false;
}
int main(){
    int t;
    cin>>t;
    while(t--){
        int n,k;
        cin>>n>>k;
        int l[n];
        vector<pair<int,int>>m;
        for(int i=0;i<n;i++){
            cin>>l[i];
        }
        sort(l,l+n);
        int say=1;
        for(int i=1;i<n;i++){
            if(l[i]==l[i-1]){
                say++;
            }
            else{
                m.push_back({l[i-1],say});
                say=1;
            }

        }
        m.push_back({l[n-1],say});

        sort(m.begin(),m.end(),comp);
        for(auto& p:m){
            if(k==0){
                break;
            }
            if(k>=p.second){
                k-=p.second;
                p.second=0;

            }
            else{
                p.second-=k;
                k=0;
                break;
            }
        }
        int cvb=0;
        for(pair<int,int>p:m){
           // cout<<p.first<<" "<<p.second<<endl;
            if(p.second!=0){
                cvb++;
            }

        }
        if(cvb==0) cvb=1;
        cout<<cvb<<endl;


    }
}


Answer: 2
Problem: 2057B - Gorilla and the Exam
Language: c++17 

Code 1:
#include <bits/stdc++.h>
using namespace std;
int main() {
    int t;cin >> t;
    while(t--){
        int n;cin >> n;
        int k;cin >> k;
        vector<int> v(n);
        unordered_map<int,int> m;
        for(int i=0;i<n;i++){
            cin >> v[i];
            m[v[i]]++;
        }
        vector<int> a;
        for(auto m:m){
            a.push_back(m.second);
        }
        sort(a.begin(),a.end());
        int flag=0;
        for(int i=0;i<a.size()-1;i++){
            if(k<a[i]){
                cout << a.size()-i << endl;
                flag=1;
                break;
            }
            k-=a[i];
        }
        if(!flag)cout << 1 << endl;
    }
    return 0;
}

Code 2:
#include <bits/stdc++.h>
using namespace std;

void solve() {
    int n, k;
    cin >> n >> k;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }
    sort(v.begin(), v.end());
    vector<int> cnt = {1};
    for (int i = 1; i < n; i++) {
        if (v[i] == v[i - 1]) {
            cnt.back()++;
        } else {
            cnt.push_back(1);
        }
    }
    sort(cnt.begin(), cnt.end());
    int m = cnt.size();
    for (int i = 0; i < m - 1; i++) {
        if (cnt[i] > k) {
            cout << m - i << "\n";
            return;
        }
        k -= cnt[i];
    }
    cout << 1 << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}


Answer: 2
Problem: 2057B - Gorilla and the Exam
Language: python

Code 1:
n = int(input())
for _ in range(n):
    m, k = map(int, input().split())
    arr = list(map(int, input().split()))
    arr.sort()
    freqencies = list()
    count = 0
    prev = arr[0]
    for i in arr:
        if i == prev:
            count+=1
        else:
            prev = i
            freqencies.append(count)
            count = 1
    freqencies.append(count)
    freqencies.sort(reverse=True)            
    remove = 0
    # print(freqencies, k)
    while len(freqencies) > 1 and remove + freqencies[-1] <= k:
        remove += freqencies.pop()
    print(len(freqencies))


Code 2:
n = int(input())
for _ in range(n):
    m, k = map(int, input().split())
    arr = list(map(int, input().split()))
    from collections import Counter
    freqencies = sorted(Counter(arr).values(), reverse=True)
    remove = 0
    # print(freqencies, k)
    while len(freqencies) > 1 and remove + freqencies[-1] <= k:
        remove += freqencies.pop()
    print(len(freqencies))


Answer: 1
Problem: 2057B - Gorilla and the Exam
Language: c++20 

Code 1:
/**

                            * بسم الله الرحمن الرحيم *

    ﴾ رَبِّ اشْرَحْ لِي صَدْرِي * وَيَسِّرْ لِي أَمْرِي * وَاحْلُلْ عُقْدَةً مِّن لِّسَانِي * يَفْقَهُوا قَوْلِي ﴿

**/
#include <bits/stdc++.h>
#define ll long long
#define fi(l, r) for(ll i=l;i<r;i++)
#define fj(l, r) for(ll j=l;j<r;j++)
#define fir(r, l) for(ll i=r;i>=l;i--)
#define fjr(r, l) for(ll j=r;j>=l;j--)
#define all(x) (x).begin(), (x).end()
#define vi vector<int>
#define vll vector<ll>
#define vllll vector<vll>
#define vpll vector<pair<ll,ll>>
#define vb vector<bool>
#define pd push_back
using namespace std;

void solving(){
    ll n,k; cin>>n>>k;
    ll a[n];
    map<ll,ll> mp;
    fi(0,n) {
        cin >> a[i];
        mp[a[i]]++;
    }
    vll counts;
    for(auto e:mp ){
        counts.push_back(e.second);
    }
    sort(all(counts));
    ll e1=0;
    ll e2=counts.size()-1;
    ll res=counts.size();
    while(e1<e2){
        if(counts[e1]<=k){
            k-=counts[e1];
            res--;
            e1++;
        }else break;
    }
    cout<<res<<'\n';
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n; cin>>n;
    while(n--) solving();
}

Code 2:
/**

                            * بسم الله الرحمن الرحيم *

    ﴾ رَبِّ اشْرَحْ لِي صَدْرِي * وَيَسِّرْ لِي أَمْرِي * وَاحْلُلْ عُقْدَةً مِّن لِّسَانِي * يَفْقَهُوا قَوْلِي ﴿

**/
#include <bits/stdc++.h>
#define ll long long
#define fi(l, r) for(ll i=l;i<r;i++)
#define fj(l, r) for(ll j=l;j<r;j++)
#define fir(r, l) for(ll i=r;i>=l;i--)
#define fjr(r, l) for(ll j=r;j>=l;j--)
#define all(x) (x).begin(), (x).end()
#define vi vector<int>
#define vll vector<ll>
#define vllll vector<vll>
#define vpll vector<pair<ll,ll>>
#define vb vector<bool>
#define pd push_back
using namespace std;

void solving(){
    ll n,k; cin>>n>>k;
    ll a[n];
    unordered_map<ll,ll> mp;
    fi(0,n) {
        cin >> a[i];
        mp[a[i]]++;
    }
    vll counts;
    for(auto e:mp ){
        counts.push_back(e.second);
    }
    sort(all(counts));
    ll e1=0;
    ll e2=counts.size()-1;
    ll res=counts.size();
    while(e1<e2){
        if(counts[e1]<=k){
            res--;
            e1++;
            k-=counts[e1];
        }else break;
    }
    cout<<res<<'\n';
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n; cin>>n;
    while(n--) solving();
}

Answer: 1
Problem: 2057B - Gorilla and the Exam
Language: c++17 

Code 1:
#include <bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    while(t--){
        int n,k;
        cin>>n>>k;
        vector<int>a(n);
        map<int,int>mapping;
        for(int i=0;i<n;i++){
            cin>>a[i];
            mapping[a[i]]++;
        }
        vector<int>freq;
        for(auto i:mapping){
            freq.push_back(i.second);
        }
        
        sort(freq.begin(),freq.end());
        for(int i=0;i<n;i++){
            if(freq[i]<=k){
              k=k-freq[i];
              freq[i]=0;
            }else{
                freq[i]=freq[i]-k;
                k=0;
                break;
            }
        }
        int count=0;
        for(auto i:freq){
            if(i!=0){
                count++;
            }
        }
        if(count==0){
            count=count+1;
        }
       cout<<count<<endl;
    }
}


Code 2:
#include <bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    while(t--){
        int n,k;
        cin>>n>>k;
        map<int,int>mapping;
        for(int i=0;i<n;i++){
            int x;
            cin>>x;
            mapping[x]++;
        }
        int maxi=INT_MIN;
        int key=-1;
        for(auto i:mapping){
         if(i.second>maxi){
            maxi=i.second;
            key=i.first;
         }
        }
        int count=0;
        for(auto &i:mapping){
         if(i.first!=key&&i.second<=k){
            int x=i.second;
            i.second=0;
            k=k-x;
            mapping[key]+=x;
            
         }else if(i.first!=key&&i.second>k){
            mapping[key]+=k;
            i.second=i.second-k;
            k=0;
         }
         if(k==0){
            break;
         }
        }
        for(auto i:mapping){
            if(i.second!=0){
                count++;
            }
        }
       cout<<count<<endl;
    }
}

Answer: 1
Problem: 2057B - Gorilla and the Exam
Language: c++17 

Code 1:
#include<bits/stdc++.h>
using namespace std;


#define md : 1000000007;



void solve(){
    int n,k;
    cin >> n >> k;

    vector<int> vec(n);

    unordered_map<int,int> mp;
    vector<int>count = {1};

    for(int i=0; i<n; i++){
        cin >> vec[i];
        mp[vec[i]]++;
    }

    sort(vec.begin(),vec.end());
    for(int i=1; i<vec.size(); i++){
        if(vec[i] == vec[i-1]){
            count.back()++;
        }else{
            count.push_back(1);
        }
    }

    sort(count.begin(), count.end());
    

    int i;
    for( i=0; i<count.size(); ){
        if(count[i] > k) break;
        k-=count[i++];
        if(k == 0) break;
    }

    int res = count.size()-i != 0 ? count.size()-i : 1;

    cout << res <<  endl;
    // priority_queue<pair<int,int>, vector<pair<int,int>>, greater<> > st;

    // for(auto x: mp){
    //     st.push({x.second, x.first});
    // }

    // int count = 0;

    // while(!st.empty() && k){
    //     int temp = (st.top()).first;
    //     if(temp > k) k = 0;
    //     else{
    //         k-=temp;
    //         st.pop();
    //     }
    // }

    // st.size() > 0 ? cout <<  st.size() : cout << 1 ;
    // cout << endl;


}




int main(){

    int t;
    cin>>t;


    while(t--)
        solve();

    return 0;
}

Code 2:
#include<bits/stdc++.h>
using namespace std;


#define md : 1000000007;



void solve(){
    int n,k;
    cin >> n >> k;

    vector<int> vec(n);
    vector<int>count = {1};

    for(int i=0; i<n; i++){
        cin >> vec[i];
    }

    sort(vec.begin(),vec.end());
    for(int i=1; i<vec.size(); i++){
        if(vec[i] == vec[i-1]){
            count.back()++;
        }else{
            count.push_back(1);
        }
    }

    sort(count.begin(), count.end());
    

    int i;
    int m = count.size();
    for( i=0; i<m-1; ){
        if(count[i] > k) break;
        k-=count[i++];
    }

    cout << m-i <<  endl;
    // priority_queue<pair<int,int>, vector<pair<int,int>>, greater<> > st;

    // for(auto x: mp){
    //     st.push({x.second, x.first});
    // }

    // int count = 0;

    // while(!st.empty() && k){
    //     int temp = (st.top()).first;
    //     if(temp > k) k = 0;
    //     else{
    //         k-=temp;
    //         st.pop();
    //     }
    // }

    // st.size() > 0 ? cout <<  st.size() : cout << 1 ;
    // cout << endl;


}




int main(){

    int t;
    cin>>t;


    while(t--)
        solve();

    return 0;
}

Answer: 2
Problem: 2057B - Gorilla and the Exam
Language: c++17 

Code 1:
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int d[1000001];
int maks=1000001;
int main() 
{
  ll t;
  cin>>t;
  while(t--)
  {
    ll n,k;
    cin>>n>>k;                              
    ll a[n];
    vector<int>v;
    for(ll i=0;i<n;i++)             
    {                               
      cin>>a[i];
    }
    sort(a,a+n);
    ll say=1;
    for(ll i=0;i<n-1;i++)
    {
      if(a[i]==a[i+1])
      say++;
      else
      {
        v.push_back(say);
        say=1;
      }
  }
  v.push_back(say);
  sort(v.begin(),v.end());
  ll i=0,j=n-1;
  while(i<j and k!=0)
  {
    if( v[i]!=0)
    {
      v[i]=v[i]-1;
      k--;
    }
    if(v[i]==0)
    i++;
  }
  ll sa=0;
  for(ll g=0;g<v.size();g++)
  {
    if(v[g]>=1)
    sa++;
  }
  cout<<sa<<endl;
}
}

Code 2:
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int d[1000001];
int maks=1000001;
int main() 
{
  ll t;
  cin>>t;
  while(t--)
  {
    ll n,k;
    cin>>n>>k;                              
    ll a[n];
    vector<int>v;
    for(ll i=0;i<n;i++)             
    {                               
      cin>>a[i];
    }
    sort(a,a+n);
    ll say=1;
    for(ll i=0;i<n-1;i++)
    {
      if(a[i]==a[i+1])
      say++;
      else
      {
        v.push_back(say);
        say=1;
      }
  }
  v.push_back(say);
  sort(v.begin(),v.end());
  ll i=0,j=n-1;
  while(i<j and k!=0)
  {
    if( v[i]!=0)
    {
      v[i]=v[i]-1;
      k--;
    }
    if(v[i]==0)
    i++;
  }
  ll sa=0;
  for(ll g=0;g<v.size();g++)
  {
    if(v[g]>=1)
    sa++;
  }
  if(sa!=0)
  cout<<sa<<endl;
  else
  cout<<1<<endl;
}
}

Answer: 2
Problem: 2057C - Trip to the Olympiad
Language: python

Code 1:

import sys,random,bisect,math
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

for _ in range(int(input())):
    l,r=mi()
    a=-1
    for i in range(31):
        if(1<<i >r):
            a=i
            break
    
    num=1<<(a-1)
    rbin=bin(r)[2:]



    # i=a-2
    # while(num-1<l or num-1>r):
    #     num+=(1<<i)
    #     i-=1
    # print(num-1,num,num+1)
    num=0
    o=0
    for i in range(len(rbin)):
        if(rbin[i]=="1"):
            num+=(1<<(len(rbin)-i-1))
        
        if(num-1>=l and num!=r):
            o=1
            break

        elif(num-2>=l):
            o=2
            break
    
    if(o==1):
        out=[num-1,num,num+1]
    else:
        out=[num-2,num-1,num]
    print(*out)





    
        




Code 2:

import sys,random,bisect,math
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

for _ in range(int(input())):
    l,r=mi()
    a=-1
    for i in range(31):
        if(1<<i >r):
            a=i
            break
    
    num=1<<(a-1)
    
    if(num>l and num<=r):
        # if(num==r):
        #     out=[num,num-1,num-2]
        # elif(num==l+1):
        #     out=[l,l+1,l+2]
        if(num==l+1):
            out=[l,l+1,l+2]
        else:
            out=[num,num-1,num-2]
    else:
        out=[r,r-1,r-2]
    print(*out)

    
        




Answer: 1