제출 #656024

#제출 시각아이디문제언어결과실행 시간메모리
656024nolimiyaBitaro’s Party (JOI18_bitaro)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include <math.h> //in the name of god,aka allah //agha moosa mam baladim #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC optimize("-fgcse") #pragma GCC optimize("-fgcse-lm") #pragma GCC optimize("-fipa-sra") #pragma GCC optimize("-ftree-pre") #pragma GCC optimize("-ftree-vrp") #pragma GCC optimize("-fpeephole2") #pragma GCC optimize("-fsched-spec") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("-falign-jumps") #pragma GCC optimize("-falign-loops") #pragma GCC optimize("-falign-labels") #pragma GCC optimize("-fdevirtualize") #pragma GCC optimize("-fcaller-saves") #pragma GCC optimize("-fcrossjumping") #pragma GCC optimize("-fthread-jumps") #pragma GCC optimize("-funroll-loops") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("-freorder-functions") #pragma GCC optimize("-findirect-inlining") #pragma GCC optimize("-fhoist-adjacent-loads") #pragma GCC optimize("-frerun-cse-after-loop") #pragma GCC optimize("-ftree-switch-conversion") #pragma GCC optimize("-foptimize-sibling-calls") #pragma GCC optimize("-fexpensive-optimizations") #pragma GCC optimize("-fdelete-null-pointer-checks") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #pragma GCC optimize("unroll-loops") using namespace std; #define pi pair<long long , long long> #define pii pair<long long , pair<long long , long long>> const int maxm = 3e5; const long long mod = 1e9 + 7 ; typedef long long ll; ll l,r,mid; ll n,m; ll dis[maxm] , sum[maxm]; bool isval(int mid){ //cout << mid <<" " << mid*mid-mid <<endl; if (((mid-1)*mid)/2 < m) return 0; return 1; } ll darage[maxm] , ss , mm; queue<int> q; vector<int> g[maxm] , z[maxm]; ll sath[maxm]; bool vis[maxm],gos[maxm]; ll pedaret[maxm]; ll get_par(ll v){ if (pedaret[v]==v) return v; return pedaret[v] = get_par(pedaret[v]); } ll pars1[maxm] , pars2[maxm]; vector<ll> se[maxm]; set<pi> st; ll rp[maxm]; //ll rw[maxm][maxm]; map<ll,ll> mp; const int sq = 502; pi w[maxm][sq]; pi dp[sq*2+1]; void merge(int x, int y){ ss=mm=0; while(mm<sq||ss<sq){ if(ss==sq||(mm<sq&&w[y][mm].first>w[x][ss].first+1)) dp[ss+mm]=w[y][mm] , mm++; else dp[ss+mm]=w[x][ss] , dp[ss+mm].first++ , ss++; } //cout<<66; mid = 0; for(int i=0; i<2*sq&&mid<sq; i++){ if(dp[i].second!=-1&&!vis[dp[i].second]) w[y][mid++]=dp[i] , vis[dp[i].second]=1;// , mid+=dp[i]; } //cout<<67; for(int i=0; i<2*sq; i++) if(dp[i].second!=-1) vis[dp[i].second]=0; } int main(){ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); int q; cin >>n>>m>>q; for(int i=0; i<m; i++){ cin >>l>>r,l--,r--; g[r].push_back(l); } for(int i=0; i<n; i++){ for (int j=0; j<sq; j++) w[i][j] = {-1,-1}; w[i][0]=pi{0,i}; for(auto x:g[i]) merge(x,i); } //cout<<65; while(q--){ cin>>l>>r; l--; vector<int> vec(r); for(int i=0; i<r; i++){ cin>>vec[i]; vec[i]--; gos[vec[i]]=1; } vec.shrink_to_fit(); mid=-1; if(r>=sq){ for(int i=0; i<=l; i++){ if(gos[i]) pedaret[i]=-1; else pedaret[i]=0; for(auto x:g[i]){ if(pedaret[x]!=-1) pedaret[i]=max(pedaret[i],pedaret[x]+1); //cout<<pedaret[i]<<" "<<pedaret[x]<<endl; } } mid=pedaret[l]; } else{ for(int i=0; i<sq; i++) if(!gos[w[l][i].second]){ mid=max(mid,w[l][i].first); //cout<<i<<" "<<mid<<endl; } } for(auto x:vec) gos[x]=0; cout<<mid<<endl; } }

컴파일 시 표준 에러 (stderr) 메시지

bitaro.cpp:5: warning: ignoring '#pragma comment ' [-Wunknown-pragmas]
    5 | #pragma comment(linker, "/stack:200000000")
      | 
/tmp/ccj7UYC4.o: in function `__tcf_2':
bitaro.cpp:(.text+0x9): relocation truncated to fit: R_X86_64_PC32 against symbol `se' defined in .bss section in /tmp/ccj7UYC4.o
/tmp/ccj7UYC4.o: in function `__tcf_0':
bitaro.cpp:(.text+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `g' defined in .bss section in /tmp/ccj7UYC4.o
/tmp/ccj7UYC4.o: in function `__tcf_1':
bitaro.cpp:(.text+0xa9): relocation truncated to fit: R_X86_64_PC32 against symbol `z' defined in .bss section in /tmp/ccj7UYC4.o
/tmp/ccj7UYC4.o: in function `isval(int)':
bitaro.cpp:(.text+0x108): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccj7UYC4.o
/tmp/ccj7UYC4.o: in function `get_par(long long)':
bitaro.cpp:(.text+0x120): relocation truncated to fit: R_X86_64_PC32 against symbol `pedaret' defined in .bss section in /tmp/ccj7UYC4.o
/tmp/ccj7UYC4.o: in function `merge(int, int)':
bitaro.cpp:(.text+0x2a3): relocation truncated to fit: R_X86_64_PC32 against symbol `ss' defined in .bss section in /tmp/ccj7UYC4.o
bitaro.cpp:(.text+0x2ba): relocation truncated to fit: R_X86_64_PC32 against symbol `mm' defined in .bss section in /tmp/ccj7UYC4.o
bitaro.cpp:(.text+0x2cf): relocation truncated to fit: R_X86_64_PC32 against symbol `mid' defined in .bss section in /tmp/ccj7UYC4.o
bitaro.cpp:(.text+0x2da): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccj7UYC4.o
bitaro.cpp:(.text+0x47f): relocation truncated to fit: R_X86_64_PC32 against symbol `mid' defined in .bss section in /tmp/ccj7UYC4.o
bitaro.cpp:(.text+0x486): additional relocation overflows omitted from the output
/usr/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax
collect2: error: ld returned 1 exit status