Language: C++

#include <bits/stdc++.h>    
//#include <ext/pb_ds/assoc_container.hpp> 
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//using namespace __gnu_pbds; 
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define pb  push_back
#define show(x) cout<<(#x)<<" : "<<x<<endl;
#define ll  long long
#define ld  long double
#define fill(a,val) memset(a,val,sizeof(a))
#define mp  make_pair
#define ff  first
#define ss  second
#define pii pair<ll,ll>
#define sq(x) ((x)*(x))
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define endl "\n"
#define int long long 
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";
const ll MOD     = 1000*1000*1000+7;
const ll INF     = 1ll*1000*1000*1000*1000*1000*1000 + 7;
const ll MOD2    = 998244353;
const ll N       = 1000 * 100 + 10;
const ll N2      = 70;
const ld PI  = 3.141592653589793;
//template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);} 
ll power(ll x,ll y,ll p = LLONG_MAX ){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
ll lcm(ll a , ll b){return (a*b)/gcd(a,b);}
int a[N] , si[N];
void initialize(int n)
{
    for (int i = 0; i < n; ++i)
    {
        a[i] = i;
        si[i] = 1;
    }
}
int root(int i )
{
    while(a[i]!=i)
        i = a[i];
    return i;
}
bool find(int A , int B)
{
    return (root(A)==root(B));
}
void weighted_union(int A , int B)
{
    int root_A = root(A);
    int root_B = root(B);
    if(si[root_A]<si[root_B])
    {
        a[root_A] = a[root_B];
        si[root_B]+=si[root_A];
    }
    else
    {
        a[root_B] = a[root_A];
        si[root_A]+=si[root_B];
    }
}
signed main()
{
    fastio();
    //cout<<fixed<<setprecision(20);
    //CHECK for LONG LONG and LONG DOUBLE
    //*comment for all except cc/cf    
    #ifndef ONLINE_JUDGE    
           freopen("input.txt","r",stdin);
           freopen("output.txt","w",stdout);
    #endif//*/
    int n,m;
    cin>>n>>m;
    initialize(n);
    set<pii> s;
    for (int i = 0; i < m; ++i)
    {
        int x,y;
        cin>>x>>y;
        x--;y--;
        s.insert({max(x,y),min(x,y)});
    }
    for(auto x : s)
    {
        if(!find(x.ff,x.ss))
            weighted_union(x.ff,x.ss);
    }
    int ans = 1;
    for (int i = 0; i < n; ++i)
    {
        ans = max(ans,si[root(i)]);
    }
    cout<<ans;


    printclock;
    return 0;
}#include <bits/stdc++.h>    
//#include <ext/pb_ds/assoc_container.hpp> 
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//using namespace __gnu_pbds; 
#define fastio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define pb  push_back
#define show(x) cout<<(#x)<<" : "<<x<<endl;
#define ll  long long
#define ld  long double
#define fill(a,val) memset(a,val,sizeof(a))
#define mp  make_pair
#define ff  first
#define ss  second
#define pii pair<ll,ll>
#define sq(x) ((x)*(x))
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define endl "\n"
#define int long long 
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";
const ll MOD     = 1000*1000*1000+7;
const ll INF     = 1ll*1000*1000*1000*1000*1000*1000 + 7;
const ll MOD2    = 998244353;
const ll N       = 1000 * 100 + 10;
const ll N2      = 70;
const ld PI  = 3.141592653589793;
//template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);} 
ll power(ll x,ll y,ll p = LLONG_MAX ){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
ll lcm(ll a , ll b){return (a*b)/gcd(a,b);}
int a[N] , si[N];
void initialize(int n)
{
    for (int i = 0; i < n; ++i)
    {
        a[i] = i;
        si[i] = 1;
    }
}
int root(int i )
{
    while(a[i]!=i)
        i = a[i];
    return i;
}
bool find(int A , int B)
{
    return (root(A)==root(B));
}
void weighted_union(int A , int B)
{
    int root_A = root(A);
    int root_B = root(B);
    if(si[root_A]<si[root_B])
    {
        a[root_A] = a[root_B];
        si[root_B]+=si[root_A];
    }
    else
    {
        a[root_B] = a[root_A];
        si[root_A]+=si[root_B];
    }
}
signed main()
{
    fastio();
    //cout<<fixed<<setprecision(20);
    //CHECK for LONG LONG and LONG DOUBLE
    //*comment for all except cc/cf    
    #ifndef ONLINE_JUDGE    
           freopen("input.txt","r",stdin);
           freopen("output.txt","w",stdout);
    #endif//*/
    int n,m;
    cin>>n>>m;
    initialize(n);
    set<pii> s;
    for (int i = 0; i < m; ++i)
    {
        int x,y;
        cin>>x>>y;
        x--;y--;
        s.insert({max(x,y),min(x,y)});
    }
    for(auto x : s)
    {
        if(!find(x.ff,x.ss))
            weighted_union(x.ff,x.ss);
    }
    int ans = 1;
    for (int i = 0; i < n; ++i)
    {
        ans = max(ans,si[root(i)]);
    }
    cout<<ans;


    printclock;
    return 0;
}

Compiler output:
a.cc:104:2: error: stray '#' in program
  104 | }#include <bits/stdc++.h>
      |  ^
a.cc:104:3: error: 'include' does not name a type
  104 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:127:10: error: redefinition of 'const long long int MOD'
  127 | const ll MOD     = 1000*1000*1000+7;
      |          ^~~
a.cc:24:10: note: 'const long long int MOD' previously defined here
   24 | const ll MOD     = 1000*1000*1000+7;
      |          ^~~
a.cc:128:10: error: redefinition of 'const long long int INF'
  128 | const ll INF     = 1ll*1000*1000*1000*1000*1000*1000 + 7;
      |          ^~~
a.cc:25:10: note: 'const long long int INF' previously defined here
   25 | const ll INF     = 1ll*1000*1000*1000*1000*1000*1000 + 7;
      |          ^~~
a.cc:129:10: error: redefinition of 'const long long int MOD2'
  129 | const ll MOD2    = 998244353;
      |          ^~~~
a.cc:26:10: note: 'const long long int MOD2' previously defined here
   26 | const ll MOD2    = 998244353;
      |          ^~~~
a.cc:130:10: error: redefinition of 'const long long int N'
  130 | const ll N       = 1000 * 100 + 10;
      |          ^
a.cc:27:10: note: 'const long long int N' previously defined here
   27 | const ll N       = 1000 * 100 + 10;
      |          ^
a.cc:131:10: error: redefinition of 'const long long int N2'
  131 | const ll N2      = 70;
      |          ^~
a.cc:28:10: note: 'const long long int N2' previously defined here
   28 | const ll N2      = 70;
      |          ^~
a.cc:132:10: error: redefinition of 'const long double PI'
  132 | const ld PI  = 3.141592653589793;
      |          ^~
a.cc:29:10: note: 'const long double PI' previously defined here
   29 | const ld PI  = 3.141592653589793;
      |          ^~
a.cc:134:4: error: redefinition of 'long long int gcd(long long int, long long int)'
  134 | ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
      |    ^~~
a.cc:31:4: note: 'long long int gcd(long long int, long long int)' previously defined here
   31 | ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
      |    ^~~
a.cc:135:4: error: redefinition of 'long long int power(long long int, long long int, long long int)'
  135 | ll power(ll x,ll y,ll p = LLONG_MAX ){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
      |    ^~~~~
a.cc:32:4: note: 'long long int power(long long int, long long int, long long int)' previously defined here
   32 | ll power(ll x,ll y,ll p = LLONG_MAX ){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
      |    ^~~~~
a.cc:136:4: error: redefinition of 'long long int lcm(long long int, long long int)'
  136 | ll lcm(ll a , ll b){return (a*b)/gcd(a,b);}
      |    ^~~
a.cc:33:4: note: 'long long int lcm(long long int, long long int)' previously defined here
   33 | ll lcm(ll a , ll b){return (a*b)/gcd(a,b);}
      |    ^~~
a.cc:137:5: error: redefinition of 'long long int a [100010]'
  137 | int a[N] , si[N];
      |     ^
a.cc:34:5: note: 'long long int a [100010]' previously declared here
   34 | int a[N] , si[N];
      |     ^
a.cc:137:12: error: redefinition of 'long long int si [100010]'
  137 | int a[N] , si[N];
      |            ^~
a.cc:34:12: note: 'long long int si [100010]' previously declared here
   34 | int a[N] , si[N];
      |            ^~
a.cc:138:6: error: redefinition of 'void initialize(long long int)'
  138 | void initialize(int n)
      |      ^~~~~~~~~~
a.cc:35:6: note: 'void initialize(long long int)' previously defined here
   35 | void initialize(int n)
      |      ^~~~~~~~~~
a.cc:146:5: error: redefinition of 'long long int root(long long int)'
  146 | int root(int i )
      |     ^~~~
a.cc:43:5: note: 'long long int root(long long int)' previously defined here
   43 | int root(int i )
      |     ^~~~
a.cc:152:6: error: redefinition of 'bool find(long long int, long long int)'
  152 | bool find(int A , int B)
      |      ^~~~
a.cc:49:6: note: 'bool find(long long int, long long int)' previously defined here
   49 | bool find(int A , int B)
      |      ^~~~
a.cc:156:6: error: redefinition of 'void weighted_union(long long int, long long int)'
  156 | void weighted_union(int A , int B)
      |      ^~~~~~~~~~~~~~
a.cc:53:6: note: 'void weighted_union(long long int, long long int)' previously defined here
   53 | void weighted_union(int A , int B)
      |      ^~~~~~~~~~~~~~
a.cc:171:8: error: redefinition of 'int main()'
  171 | signed main()
      |        ^~~~
a.cc:68:8: note: 'int main()' previously defined here
   68 | signed main()
      |        ^~~~