답안 #1005630

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1005630 2024-06-22T16:42:45 Z modwwe Tourism (JOI23_tourism) C++17
컴파일 오류
0 ms 0 KB
//https://www.instagram.com/_modwwe/
#pragma GCC optimize("Ofast ")
//#pragma GCC target("avx2,bmi,bmi2")
#include<bits/stdc++.h>
//#define int long long
//#define ll long long
#define down cout<<'\n';
#define NHP     ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
#define modwwe  int t;cin>>t; while(t--)
#define bit(i,j) (i>>j&1)
#define sobit(a) __builtin_popcountll(a)
#define task "test"
#define fin(x) freopen(x".inp","r",stdin)
#define fou(x) freopen(x".out","w",stdout)
#define pb push_back
#define checktime   cerr << (double)clock() / CLOCKS_PER_SEC * 1000  << " ms";
using namespace std;
void phongbeo();
const int mod2=1e9+7;
const int  mod1=998244353;
struct icd
{
    int a,b;
};
struct ib
{
    int a;
    int b;
};
struct ic
{
    int a,b,c;
};
struct id
{
    int a,c;
};
struct ie
{
    int a,b,c, d,e,f;

};
int n,m,s1,s2,s4,s3,sf,k,r,mid,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,l;
int  i,s10,s12;
int el=29;
main()
{
#ifndef ONLINE_JUDGE
       fin(task),fou(task);
#endif
    ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
    /// cin>>s1;
    // modwwe
    phongbeo();
    checktime
}
int t[400007];
int depth[100007];
ic a[100007];
int c[100007];
ib euler[100007];
int d[100007];
int st[17][100007];
int ans[100007];
int S;
int b[100007];
int sl[100007];
vector<int> v[100007];
int e[100007];
int pre[100007];
int nxt[100007];
bool cmp(ic a,ic b)
{
    if(a.a / S != b.a / S) return (a.a < b.a);
    else if(!((a.a / S) & 1)) return (a.b < b.b);
    else return (a.b > b.b);
}
void upd(int node,int l,int r,int l1,int r1,int cc)
{
    if(l>=l1&&r<=r1)
    {
        if(cc==1) t[node]=l;
         else t[node]=0;
        return;
    }
    int mid=l+r>>1;
    if(mid>=r1)
        upd(node<<1,l,mid,l1,r1,cc);
    else
        upd(node<<1|1,mid+1,r,l1,r1,cc);
    t[node]=max(t[node<<1],t[node<<1|1]);
}
int get1(int node,int l,int r,int l1,int r1)
{
    if(l>r1||r<l1) return 0;
    if(l>=l1&&r<=r1) return t[node];

    int mid=l+r>>1;
 int ss3=0;
    if(t[node<<1|1]!=0) ss3=get1(node<<1|1,mid+1,r,l1,r1);
    if(ss3!=0) return ss3;
else return get1(node<<1,l,mid,l1,r1);
}
void dfs(int x,int y)
{
    st[0][x]=y;
    depth[x]=depth[y]+1;
    euler[x].a=++dem;
    mx=max(mx,depth[x]);
    c[dem]=x;
    for(auto f:v[x])
        if(f!=y)
            dfs(f,x);
    euler[x].b=dem;
}
int lca(int x,int y,int cc)
{
    if(x==0||x==n+1||y==0||y==n+1) return 1;
    if(depth[x]<depth[y]) swap(x,y),cc=0;
    int ss=depth[x]-depth[y]-1;
    if(ss>=0)
        for(int j=0; j<mx; ++j)
            if(bit(ss,j))
                x=st[j][x];
    if(st[0][x]==y) return x;
    if(ss!=-1)  x=st[0][x];
    for(int j=mx-1; j>=0; --j)
        if(st[j][x]!=st[j][y])
            x=st[j][x],y=st[j][y];
    if(cc==0) return y;
    else
        return x;
}
int lca2(int x,int y)
{
    if(x==0 )return y;
    if(y==0 )return x;
    if(depth[x]<depth[y]) swap(x,y);
    int ss=depth[x]-depth[y];
    if(ss!=0)
    for(int j=0; j<mx; ++j)
        if(bit(ss,j))
            x=st[j][x];
    if(x==y) return x;
    for(int j=mx-1; j>=0; --j)
        if(st[j][x]!=st[j][y])
            x=st[j][x],y=st[j][y];
    return st[0][x];
}
/*void build2(int node,int l,int r)
{
    if(l==r)
    {
        lz[node]=b[l];
        return;
    }
    int mid=l+r>>1;
    build2(node<<1,l,mid);
    build2(node<<1|1,mid+1,r);
    lz[node]=lca2(lz[node<<1],lz[node<<1|1]);
}
int get_lca(int node,int l,int r,int l1,int r1)
{
    if(l>r1||r<l1) return 0;
    if(l>=l1&&r<=r1) return lz[node];
    int mid=l+r>>1;
    return lca2(get_lca(node<<1,l,mid,l1,r1),get_lca(node<<1|1,mid+1,r,l1,r1));
}*/
void add(int x)
{
    s2=get1(1,1,n,1,euler[x].a);
    /// s3=get2(1,1,n,euler[x].a,n);
    sl[x]++;
    if(sl[x]==1)
    upd(1,1,n,euler[x].a,euler[x].a,1);
    if(d[x]!=0||sl[x]>1) return;
    s2=c[s2];
    s3=nxt[s2];
    pre[x]=s2;
    nxt[x]=s3;
    nxt[s2]=x;
    pre[s3]=x;
//if(l==3&&x==1) cout<<s2<<" "<<s3<<" "<<x,down
    s2=lca(x,s2,1);
    s3=lca(x,s3,1);
    if(depth[s2]<depth[s3]) swap(s2,s3);
    if(depth[x]>=depth[s2])
    {
        s4+=depth[x]-depth[s2]+1;
        d[x]=s2;
        e[s2]=x;
    }
}
void del(int x)
{sl[x]--;
 if(sl[x]==0)
    upd(1,1,n,euler[x].a,euler[x].a,-1);
    s5=d[x];
    //s2=get1(1,1,n,euler[s5].a,euler[x].a);
    //s3=get2(1,1,n,euler[x].a,euler[s5].b);
    if(sl[x]>=1) return;
    s2=pre[x];
    s3=nxt[x];
    nxt[s2]=s3;
    if(s3!=0) pre[s3]=s2;
    pre[x]=0;
    nxt[x]=0;
    s9=s2;
    if(d[x]==0)return;
    d[x]=0;
    e[s5]=0;
    s4-=(depth[x]-depth[s5]+1);
    s2=lca(s2,x,1);
    s3=lca(s3,x,1);
    if(max(depth[s2],depth[s3])<=depth[s5]) return;
    if(st[0][s2]==s9&&depth[s2]>=depth[s3]&&d[s2]==0)
    {
        s2=s9;
        s4+=depth[s2]-depth[s5]+1;
        d[s2]=s5;
        e[s5]=s2;
        return;
    }
    if(depth[s2]<depth[s3])swap(s2,s3);
    if(depth[s5]<depth[s2])
    {
        s3=e[s2];
        e[s2]=0;
        e[s5]=s3;
        d[s3]=s5;
        s4+=(depth[s2]-depth[s5]);
    }
}
void go(int x,int y)
{
    while(r<y)
    {
        ++r;
        add(b[r]);

    }
    while(l>x)
    {
        --l;

        add(b[l]);
        //cout<<l<<" "<<s4,down

    }
    //cout<<s4<<" "<<x<<" "<<y,down
    while(l<x)
    {
        del(b[l]);
        ++l;
    }
    while(r>y)
    {
        del(b[r]);

        --r;
    }

}
int cinn()
{
    char c;
    while (c = getchar(), c < '0' || c > '9');
    int x = c - '0';
    while (c = getchar(), c >= '0' && c <= '9')
        x = x * 10 + c - '0';
    return x;
}
void phongbeo()
{
  cin>>n>>m>>k;
    S=sqrt(m);bool de=0;
    for(int i=1; i<n; ++i){
        cin>>l>>r,v[l].pb(r),v[r].pb(l);
        if(r/2!=l) de=1;}

    dfs(1,0);
        if(!de)mx=5;
else mx=log2(mx)+1;
if(mx>17) mx=17;
    for(int i=1; i<mx; ++i)
        for(int j=1; j<=n; ++j)
            st[i][j]=st[i-1][st[i-1][j]];
    for(int i=1; i<=m; ++i)
        cin>>b[i];
    for(int i=1; i<=k; ++i)
        cin>>a[i].a>>a[i].b,a[i].c=i;
    sort(a+1,a+1+k,cmp);
    l=1;
    r=0;
    for(int i=1; i<=k; ++i)
    {
        go(a[i].a,a[i].b);
        s3=t[1];
        s5=nxt[0];
        s3=c[s3];
        s3=lca2(s3,s5);
        ans[a[i].c]=s4+depth[1]-depth[s3];
    }
    for(int i=1; i<=k; ++i)
        printf("%d",ans[i]),
               printf("\n");
}

/*
8 8 2
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 6 4 3 5 2 4 7
2 8
1 2

*/

Compilation message

tourism.cpp:2:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
    2 | #pragma GCC optimize("Ofast ")
      |                              ^
In file included from /usr/include/c++/10/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
                 from tourism.cpp:4:
/usr/include/assert.h:71:43: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   71 |      __THROW __attribute__ ((__noreturn__));
      |                                           ^
/usr/include/assert.h:71:43: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/assert.h:76:43: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   76 |      __THROW __attribute__ ((__noreturn__));
      |                                           ^
/usr/include/assert.h:76:43: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/assert.h:82:43: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   82 |      __THROW __attribute__ ((__noreturn__));
      |                                           ^
/usr/include/assert.h:82:43: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
In file included from /usr/include/c++/10/cctype:42,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:35,
                 from tourism.cpp:4:
/usr/include/ctype.h:80:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   80 |      __THROW __attribute__ ((__const__));
      |                                        ^
/usr/include/ctype.h:80:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:82:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   82 |      __THROW __attribute__ ((__const__));
      |                                        ^
/usr/include/ctype.h:82:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:84:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   84 |      __THROW __attribute__ ((__const__));
      |                                        ^
/usr/include/ctype.h:84:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:518,
                 from /usr/include/c++/10/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
                 from tourism.cpp:4:
/usr/include/ctype.h:108:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  108 | __exctype (isalnum);
      | ^~~~~~~~~
/usr/include/ctype.h:108:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:109:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  109 | __exctype (isalpha);
      | ^~~~~~~~~
/usr/include/ctype.h:109:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:110:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  110 | __exctype (iscntrl);
      | ^~~~~~~~~
/usr/include/ctype.h:110:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:111:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  111 | __exctype (isdigit);
      | ^~~~~~~~~
/usr/include/ctype.h:111:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:112:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  112 | __exctype (islower);
      | ^~~~~~~~~
/usr/include/ctype.h:112:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:113:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  113 | __exctype (isgraph);
      | ^~~~~~~~~
/usr/include/ctype.h:113:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:114:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  114 | __exctype (isprint);
      | ^~~~~~~~~
/usr/include/ctype.h:114:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:115:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  115 | __exctype (ispunct);
      | ^~~~~~~~~
/usr/include/ctype.h:115:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:116:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  116 | __exctype (isspace);
      | ^~~~~~~~~
/usr/include/ctype.h:116:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:117:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  117 | __exctype (isupper);
      | ^~~~~~~~~
/usr/include/ctype.h:117:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:118:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  118 | __exctype (isxdigit);
      | ^~~~~~~~~
/usr/include/ctype.h:118:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:122:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  122 | extern int tolower (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:122:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:125:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  125 | extern int toupper (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:125:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:130:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  130 | __exctype (isblank);
      | ^~~~~~~~~
/usr/include/ctype.h:130:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:135:42: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  135 | extern int isctype (int __c, int __mask) __THROW;
      |                                          ^~~~~~~
/usr/include/ctype.h:135:42: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:142:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  142 | extern int isascii (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:142:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:146:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  146 | extern int toascii (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:146:30: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:150:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  150 | __exctype (_toupper);
      | ^~~~~~~~~
/usr/include/ctype.h:150:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:151:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  151 | __exctype (_tolower);
      | ^~~~~~~~~
/usr/include/ctype.h:151:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:251:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  251 | __exctype_l (isalnum_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:251:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:252:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  252 | __exctype_l (isalpha_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:252:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:253:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  253 | __exctype_l (iscntrl_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:253:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:254:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  254 | __exctype_l (isdigit_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:254:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:255:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  255 | __exctype_l (islower_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:255:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:256:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  256 | __exctype_l (isgraph_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:256:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:257:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  257 | __exctype_l (isprint_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:257:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:258:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  258 | __exctype_l (ispunct_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:258:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:259:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  259 | __exctype_l (isspace_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:259:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:260:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  260 | __exctype_l (isupper_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:260:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:261:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  261 | __exctype_l (isxdigit_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:261:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:263:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  263 | __exctype_l (isblank_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:263:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:267:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  267 | extern int __tolower_l (int __c, locale_t __l) __THROW;
      |                                                ^~~~~~~
/usr/include/ctype.h:267:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:268:46: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  268 | extern int tolower_l (int __c, locale_t __l) __THROW;
      |                                              ^~~~~~~
/usr/include/ctype.h:268:46: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:271:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  271 | extern int __toupper_l (int __c, locale_t __l) __THROW;
      |                                                ^~~~~~~
/usr/include/ctype.h:271:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/ctype.h:272:46: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  272 | extern int toupper_l (int __c, locale_t __l) __THROW;
      |                                              ^~~~~~~
/usr/include/ctype.h:272:46: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/errno.h:37:45: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   37 | extern int *__errno_location (void) __THROW __attribute_const__;
      |                                             ^~~~~~~~~~~~~~~~~~~
/usr/include/errno.h:37:45: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/locale.h:122:63: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  122 | extern char *setlocale (int __category, const char *__locale) __THROW;
      |                                                               ^~~~~~~
/usr/include/locale.h:122:63: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/locale.h:125:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  125 | extern struct lconv *localeconv (void) __THROW;
      |                                        ^~~~~~~
/usr/include/locale.h:125:40: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/locale.h:142:24: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  142 |       locale_t __base) __THROW;
      |                        ^~~~~~~
/usr/include/locale.h:142:24: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/locale.h:176:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  176 | extern locale_t duplocale (locale_t __dataset) __THROW;
      |                                                ^~~~~~~
/usr/include/locale.h:176:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/locale.h:180:45: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  180 | extern void freelocale (locale_t __dataset) __THROW;
      |                                             ^~~~~~~
/usr/include/locale.h:180:45: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/locale.h:187:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  187 | extern locale_t uselocale (locale_t __dataset) __THROW;
      |                                                ^~~~~~~
/usr/include/locale.h:187:48: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
In file included from /usr/include/c++/10/cmath:42,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from tourism.cpp:4:
/usr/include/c++/10/bits/cpp_type_traits.h:500:32: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  500 |     __miter_base(_Iterator __it)
      |                                ^
In file included from /usr/include/c++/10/cmath:43,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from tourism.cpp:4:
/usr/include/c++/10/ext/type_traits.h:152:35: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  152 |     __is_null_pointer(_Type* __ptr)
      |                                   ^
/usr/include/c++/10/ext/type_traits.h:157:28: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  157 |     __is_null_pointer(_Type)
      |                            ^
/usr/include/c++/10/ext/type_traits.h:162:35: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  162 |   __is_null_pointer(std::nullptr_t)
      |                                   ^
In file included from /usr/include/math.h:289,
                 from /usr/include/c++/10/cmath:45,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from tourism.cpp:4:
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:22:32: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   22 |      __attribute__ ((__const__));
      |                                ^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:22:32: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:26:32: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   26 |      __attribute__ ((__const__));
      |                                ^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:26:32: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:30:77: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   30 | __MATHDECL_1 (int, __isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
      |                                                                             ^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:30:77: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:33:78: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   33 | __MATHDECL_1 (int, __finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
      |                                                                              ^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:33:78: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:36:77: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   36 | __MATHDECL_1 (int, __isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
      |                                                                             ^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:36:77: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:518,
                 from /usr/include/c++/10/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
                 from tourism.cpp:4:
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:39:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   39 | __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:39:1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
In file included from /usr/include/math.h:289,
                 from /usr/include/c++/10/cmath:45,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from tourism.cpp:4:
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:43:32: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
   43 |      __attribute__ ((__const__));
      |                                ^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:43:32: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
In file included from /usr/include/features.h:461,