제출 #567909

#제출 시각아이디문제언어결과실행 시간메모리
567909zaneyuFlights (JOI22_flights)C++17
30 / 100
426 ms13580 KiB
#include "Ali.h" #include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<long long,null_type,less_equal<long long>,rb_tree_tag,tree_order_statistics_node_update> indexed_set; #pragma GCC optimize("Ofast") //#pragma GCC target("avx2") //order_of_key #of elements less than x // find_by_order kth element using ll=long long; using ld=long double; using pii=pair<int,int>; #define f first #define s second #define pb push_back #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(int i=1;i<=n;i++) #define FILL(n,x) memset(n,x,sizeof(n)) #define ALL(_a) _a.begin(),_a.end() #define sz(x) (int)x.size() #define SORT_UNIQUE(c) (sort(c.begin(),c.end()),c.resize(distance(c.begin(),unique(c.begin(),c.end())))) const ll maxn=5e5+5; const ll maxlg=__lg(maxn)+2; const ll INF64=4e18; const int INF=0x3f3f3f3f; const ll MOD=1e9+7; const ld PI=acos(-1); const ld eps=1e-6; #define lowb(x) x&(-x) #define MNTO(x,y) x=min(x,(__typeof__(x))y) #define MXTO(x,y) x=max(x,(__typeof__(x))y) template<typename T1,typename T2> ostream& operator<<(ostream& out,pair<T1,T2> P){ out<<P.f<<' '<<P.s; return out; } template<typename T> ostream& operator<<(ostream& out,vector<T> V){ REP(i,sz(V)) out<<V[i]<<((i!=sz(V)-1)?" ":""); return out; } namespace { int variable_example = 0; } vector<int> v[maxn]; int n; void Init(int N, std::vector<int> U, std::vector<int> V) { n=N; REP(i,n) v[i].clear(); REP(i,n-1){ v[U[i]].pb(V[i]); v[V[i]].pb(U[i]); } REP(i,n) SetID(i,i); } int dep[maxn]; void dfs(int u,int p){ //cout<<u<<' '<<dep[u]<<'\n'; for(int x:v[u]){ if(x==p) continue; dep[x]=dep[u]+1; dfs(x,u); } } std::string SendA(std::string S) { int x=0; REP(i,10){ x=(x*2)+(S[i]-'0'); } int y=0; REP(i,10){ y=(y*2)+(S[i+10]-'0'); } vector<int> vv; vector<vector<int>> tmp; REP(i,n){ if(i%1024==x){ vector<int> dst; dep[i]=0; dfs(i,-1); REP(a,n) dst.pb(dep[a]); tmp.pb(dst); vv.pb(i); } } string ans=""; REP(i,n){ if(i%1024==y){ REP(j,sz(vv)){ if(vv[j]>=i) break; int d=tmp[j][i]; REP(j,14){ bool z=(d&(1<<(13-j))); ans.pb('0'+z); } } } } return ans; }
#include "Benjamin.h" #include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<long long,null_type,less_equal<long long>,rb_tree_tag,tree_order_statistics_node_update> indexed_set; #pragma GCC optimize("Ofast") //#pragma GCC target("avx2") //order_of_key #of elements less than x // find_by_order kth element using ll=long long; using ld=long double; using pii=pair<int,int>; #define f first #define s second #define pb push_back #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(int i=1;i<=n;i++) #define FILL(n,x) memset(n,x,sizeof(n)) #define ALL(_a) _a.begin(),_a.end() #define sz(x) (int)x.size() #define SORT_UNIQUE(c) (sort(c.begin(),c.end()),c.resize(distance(c.begin(),unique(c.begin(),c.end())))) const ll maxn=5e5+5; const ll maxlg=__lg(maxn)+2; const ll INF64=4e18; const int INF=0x3f3f3f3f; const ll MOD=1e9+7; const ld PI=acos(-1); const ld eps=1e-6; #define lowb(x) x&(-x) #define MNTO(x,y) x=min(x,(__typeof__(x))y) #define MXTO(x,y) x=max(x,(__typeof__(x))y) template<typename T1,typename T2> ostream& operator<<(ostream& out,pair<T1,T2> P){ out<<P.f<<' '<<P.s; return out; } template<typename T> ostream& operator<<(ostream& out,vector<T> V){ REP(i,sz(V)) out<<V[i]<<((i!=sz(V)-1)?" ":""); return out; } namespace { int variable_example = 0; int n,x,y; } std::string SendB(int N, int X, int Y) { if(X>Y) swap(X,Y); n=N,x=X,y=Y; string ans=""; REP(i,10){ bool a=(X&(1<<(9-i))); ans.pb('0'+a); } REP(i,10){ bool a=(Y&(1<<(9-i))); ans.pb('0'+a); } return ans; } int Answer(std::string T) { vector<int> v1,v2; REP(i,n) if(i%1024==x%1024) v1.pb(i); REP(i,n) if(i%1024==y%1024) v2.pb(i); int c=0; for(int a:v2){ for(int b:v1){ if(b>=a) break; if(b==x and a==y){ int ans=0; REP(j,14){ ans=ans*2+(T[c*14+j]-'0'); } return ans; } ++c; } } }

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

Ali.cpp:46:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   46 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
grader_ali.cpp:10:8: warning: '{anonymous}::_randmem' defined but not used [-Wunused-variable]
   10 |   char _randmem[12379];
      |        ^~~~~~~~

Benjamin.cpp: In function 'int Answer(std::string)':
Benjamin.cpp:65:17: warning: control reaches end of non-void function [-Wreturn-type]
   65 |     vector<int> v1,v2;
      |                 ^~
Benjamin.cpp: At global scope:
Benjamin.cpp:46:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   46 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...