제출 #1122417

#제출 시각아이디문제언어결과실행 시간메모리
1122417enzyTwo Transportations (JOI19_transportations)C++14
0 / 100
595 ms984 KiB
#include "Azer.h" #include <bits/stdc++.h> using namespace std; const int maxn=2010; const int inf=1e9+7; vector<pair<int,int>>v[maxn]; vector<int> a, b, c; int dist[maxn], m, cnt, at; void dijkstra(){ for(int i=1;i<m;i++) dist[i]=inf; set<pair<int,int>>s; for(int i=0;i<m;i++) s.insert({dist[i],i}); while(!s.empty()){ auto f=s.begin(); int u=f->second; s.erase(f); for(auto p : v[u]){ int viz=p.first, peso=p.second; if(dist[u]+peso<dist[viz]){ s.erase({dist[viz],viz}); dist[viz]=dist[u]+peso; s.insert({dist[viz],viz}); } } } } void InitA(int N, int A, vector<int> U, vector<int> V,vector<int> C){ m=N; //if(U.size()+a.size()<m-1) return; for(int i=0;i<m;i++) v[i].clear(); for(int i=0;i<U.size();i++){ v[U[i]].push_back({V[i],C[i]}); v[V[i]].push_back({U[i],C[i]}); } for(int i=0;i<a.size();i++){ v[a[i]].push_back({b[i],c[i]}); v[b[i]].push_back({a[i],c[i]}); } dijkstra(); } void ReceiveA(bool x) { if(cnt%11==0) at=0; int id=(cnt/11); int k=(cnt%11); if(x) at+=(1<<k); if(k==10){ if(id%3==0) a.push_back(at); if(id%3==1) b.push_back(at); if(id%3==2) c.push_back(at); } cnt++; } vector<int> Answer() { vector<int> ans(m); for(int i=0;i<m;i++) ans[i]=dist[i]; return ans; }
#include "Baijan.h" #include <bits/stdc++.h> using namespace std; const int maxn=2010; int n; void InitB(int N, int B, vector<int> S, vector<int> T,vector<int> D){ n=N; for(int i=0;i<B;i++){ int v=S[i], u=T[i], p=D[i]; for(int k=0;k<11;k++){ if(v&(1<<k)) SendB(1); else SendB(0); } for(int k=0;k<11;k++){ if(u&(1<<k)) SendB(1); else SendB(0); } for(int k=0;k<11;k++){ if(p&(1<<k)) SendB(1); else SendB(0); } } } void ReceiveB(bool y) { }

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

Azer.cpp: In function 'void InitA(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
Azer.cpp:30:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |     for(int i=0;i<U.size();i++){
      |                 ~^~~~~~~~~
Azer.cpp:34:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   34 |     for(int i=0;i<a.size();i++){
      |                 ~^~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...