Language: C++

// template version 1.12
using namespace std;
#include <iostream>
#include <bits/stdc++.h>

// varibable settings
#define infile "../test/sample-1.in"
#define int long long //{{{
const int INF=1e18;
const int MOD=1e9+7; //}}}

// define basic macro {{{
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define _rrep(i,n) rrepi(i,0,n)
#define rrepi(i,a,b) for(int i=(int)((b)-1);i>=(int)(a);--i)
#define rrep(...) _overload3(__VA_ARGS__,rrepi,_rrep,)(__VA_ARGS__)
#define each(i,a) for (auto&& i : a)
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define pb(a) push_back(a)
#define mp(a, b) make_pair(a, b)
#define ceil(a,b) ((a)+(b)-1)/(b)
#define uni(x) sort(all(x));x.erase(unique(all(x)),x.end())
#define ub upper_bound
#define lb lower_bound
#define posl(A, x) (lower_bound(all(A), x)-A.begin())
#define posu(A, x) (upper_bound(all(A),x)-A.begin())
template<class T> inline void chmax(T &a, const T &b) { if((a) < (b)) (a) = (b); }
template<class T> inline void chmin(T &a, const T &b) { if((a) > (b)) (a) = (b); }

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long double ld;
typedef pair<int,int> pii;
typedef tuple<int,int,int> iii;

template<typename T> using PQ = priority_queue<T, vector<T>, greater<T>>;
struct Fast { Fast(){ std::cin.tie(0); ios::sync_with_stdio(false); } } fast;

#if defined(PCM) || defined(LOCAL)
  #include "lib/dump.hpp"
#else
  #define dump(...) 42
  #define dump_1d(...) 42
  #define dump_2d(...) 42
#endif
//}}}

int gcd(int a, int b){
  if (b>a) swap(a,b);
  if (b==0) return a;
  return gcd(b, a%b);
}

int solve(){
  int n;cin>>n;
  if (n==3){
    cout << "2 5 63" << endl;
    return 0;
  }

  vi ans;
  set<int> st;
  rep(i, 2, 30001){
    if (i%6==2){
      ans.pb(i);
      ans.pb(i+2);
      st.insert(i);
      st.insert(i+2);
    }
    if (i%6==3){
      if (st.find(i)==st.find()){
        ans.pb(i);
        ans.pb(i+6);
        st.insert(i);
        st.insert(i+2);
      }
    }
    if (sz(ans)>=n-1) break;
  }

  rep(i, 2, 30001){
    if (i%6==0){
      ans.pb(i);
    }
    if (sz(ans)==n) break;
  }

  assert(sz(ans)==n);
  rep(i, sz(ans)) cout << ans[i] << (i!=sz(ans)-1 ? " " : "\n");

  int s = accumulate(all(ans), 0LL);
  int g = 0;
  each(el, ans){
    assert(gcd(el, s-el)!=1);
    g = gcd(g, el);
  }
  assert(g==1);

  return 0;
}

signed main() { //{{{
#ifdef INPUT_FROM_FILE
  std::ifstream in(infile);
  std::cin.rdbuf(in.rdbuf());
#endif
  solve();
  return 0;
} //}}}


Compiler output:
a.cc: In function 'long long int solve()':
a.cc:76:30: error: no matching function for call to 'std::set<long long int>::find()'
   76 |       if (st.find(i)==st.find()){
      |                       ~~~~~~~^~
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_set.h:806:9: note: candidate: 'template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::iterator{((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>]'
  806 |         find(const _Kt& __x)
      |         ^~~~
/usr/include/c++/14/bits/stl_set.h:806:9: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:812:9: note: candidate: 'template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::const_iterator{((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) const [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>]'
  812 |         find(const _Kt& __x) const
      |         ^~~~
/usr/include/c++/14/bits/stl_set.h:812:9: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:796:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator; key_type = long long int]'
  796 |       find(const key_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_set.h:796:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:800:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) const [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; const_iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator; key_type = long long int]'
  800 |       find(const key_type& __x) const
      |       ^~~~
/usr/include/c++/14/bits/stl_set.h:800:7: note:   candidate expects 1 argument, 0 provided