제출 #428182

#제출 시각아이디문제언어결과실행 시간메모리
428182tengiz05Two Transportations (JOI19_transportations)C++17
0 / 100
613 ms788 KiB
#include "Azer.h" #include <bits/stdc++.h> namespace { int N; int count; std::vector<int> a; } // namespace int idx; void InitA(int N, int A, std::vector<int> U, std::vector<int> V, std::vector<int> C) { ::N = N; count = 0; idx = 0; a.assign(N, 0); } void ReceiveA(bool x) { a[idx] += (1 << (count % 21)) * x; count++; if (count % 21 == 0) idx++; } std::vector<int> Answer() { std::vector<int> ans(N); for (int k = 0; k < N; ++k) { ans[k] = a[k]; } return ans; }
#include "Baijan.h" #include <bits/stdc++.h> namespace { int n; int count; bool FunctionExample(bool P) { return !P; } } // namespace typedef std::pair<int, int> pii; void InitB(int N, int B, std::vector<int> S, std::vector<int> T, std::vector<int> D) { ::n = N; std::vector<std::vector<std::pair<int, int>>> e(n); for (int i = 0; i < B - 1; i++) { e[S[i]].emplace_back(T[i], D[i]); e[T[i]].emplace_back(S[i], D[i]); } std::priority_queue<pii, std::vector<pii>> q; q.emplace(0, 0); std::vector<int> dist(n, 1e9); dist[0] = 0; while (!q.empty()) { auto [d, u] = q.top(); q.pop(); if (d > dist[u]) { continue; } for (auto [v, w] : e[u]) { if (dist[v] > d + w) { dist[v] = d + w; q.emplace(dist[v], v); } } } for (int i = 0; i < n; i++) { for (int j = 0; j < 21; j++) { SendB((1 << j) & dist[i]); } } count = 0; } void ReceiveB(bool y) { assert(false); }

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

Baijan.cpp:9:6: warning: 'bool {anonymous}::FunctionExample(bool)' defined but not used [-Wunused-function]
    9 | bool FunctionExample(bool P) {
      |      ^~~~~~~~~~~~~~~
#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...