제출 #209916

#제출 시각아이디문제언어결과실행 시간메모리
209916SegtreeSplit the Attractions (IOI19_split)C++14
11 / 100
121 ms15348 KiB
#include"split.h" #include<iostream> #include<algorithm> #include<vector> #include<queue> #include<set> #include<unordered_set> #include<cassert> using namespace std; typedef long long ll; typedef pair<ll,ll> P; typedef unordered_set<ll> uset; #define rep(i,n) for(int i=0;i<n;i++) #define rrep(i,n) for(int i=0;i<=n;i++) #define chmin(a,b) a=min(a,b) #define chmax(a,b) a=max(a,b) #define all(x) x.begin(),x.end() #pragma gcc optimize("O3") #pragma gcc optimize("unroll-loops") #pragma gcc target("avx2,see4") vector<ll> g[100010]; ll col[100010]; ll paint(ll x,ll from,ll rem,ll c){ if(~col[x])return rem; if(rem<=0)return 0; col[x]=c; rem--; for(auto y:g[x])if(y!=from){ rem=paint(y,x,rem,c); } return rem; } vector<int> find_split(int N,int A,int B,int C,vector<int> U,vector<int> V){ int M=U.size(); assert(A==1); rep(i,M){ g[U[i]].push_back(V[i]); g[V[i]].push_back(U[i]); } rep(i,N)col[i]=-1; paint(0,-1,B,2); bool fi=1; rep(i,N){ if(col[i]!=2){ if(fi)col[i]=1; else col[i]=3; fi=0; } } vector<int> fans; rep(i,N)fans.push_back(col[i]); return fans; } /* int main(){ int n,m,a,b,c; cin>>n>>m>>a>>b>>c; vector<int> U,V; rep(i,m){ ll u,v; cin>>u>>v; U.push_back(u); V.push_back(v); } vector<int> fans=find_split(n,a,b,c,U,V); for(auto t:fans)cout<<t; cout<<endl; }*/

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

split.cpp:18:0: warning: ignoring #pragma gcc optimize [-Wunknown-pragmas]
 #pragma gcc optimize("O3")
 
split.cpp:19:0: warning: ignoring #pragma gcc optimize [-Wunknown-pragmas]
 #pragma gcc optimize("unroll-loops")
 
split.cpp:20:0: warning: ignoring #pragma gcc target [-Wunknown-pragmas]
 #pragma gcc target("avx2,see4")
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...