제출 #120178

#제출 시각아이디문제언어결과실행 시간메모리
120178KLPPTwo Transportations (JOI19_transportations)C++14
6 / 100
958 ms21376 KiB
#include "Azer.h" #include <vector> #include<bits/stdc++.h> using namespace std; typedef pair<int,int> pii; #define rep(i,a,b) for(int i=a;i<b;i++) #define trav(a,v) for(auto a:v) int n_A; vector<pii > nei_A[2000]; vector<int> distanc; int cnt; int curr; void InitA(int N, int A, std::vector<int> U, std::vector<int> V, std::vector<int> C) { n_A=N; cnt=0; curr=0; } void ReceiveA(bool x) { if(x)curr+=(1<<cnt); cnt++; if(cnt==25){ //cout<<curr<<endl; distanc.push_back(curr); curr=0; cnt=0; } } std::vector<int> Answer() { return distanc; }
#include "Baijan.h" #include <vector> #include<bits/stdc++.h> using namespace std; typedef pair<int,int> pii; #define rep(i,a,b) for(int i=a;i<b;i++) #define trav(a,v) for(auto a:v) int n; vector<pii > nei[2000]; int dist[2000]; void InitB(int N, int B, std::vector<int> S, std::vector<int> T, std::vector<int> D) { n=N; rep(i,0,S.size()){ nei[S[i]].push_back(pii(T[i],D[i])); nei[T[i]].push_back(pii(S[i],D[i])); } priority_queue<pii> pq; rep(i,0,n)dist[i]=100000000; dist[0]=0; pq.push(pii(0,0)); while(!pq.empty()){ pii x=pq.top();pq.pop(); int u=x.first; int d=-x.second; if(d>dist[u])continue; trav(v,nei[u]){ if(dist[v.first]>v.second+d){ dist[v.first]=v.second+d; pq.push(pii(v.first,-dist[v.first])); } } } rep(i,0,n){ //cout<<dist[i]<<endl; rep(j,0,25){ if((dist[i]&(1<<j))>0){ SendB(true); }else SendB(false); } } } void ReceiveB(bool y) { }

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

Baijan.cpp: In function 'void InitB(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
Baijan.cpp:9:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define rep(i,a,b) for(int i=a;i<b;i++)
Baijan.cpp:17:7:
   rep(i,0,S.size()){
       ~~~~~~~~~~~~               
Baijan.cpp:17:3: note: in expansion of macro 'rep'
   rep(i,0,S.size()){
   ^~~
#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...