# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
520018 | KoD | Putovanje (COCI20_putovanje) | C++17 | 110 ms | 22988 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using std::vector;
using std::array;
using std::pair;
using std::tuple;
template <class F> struct RecLambda : private F {
explicit RecLambda(F&& f) : F(std::forward<F>(f)) {}
template <class... Args> decltype(auto) operator()(Args&&... args) const {
return F::operator()(*this, std::forward<Args>(args)...);
}
};
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int N;
std::cin >> N;
vector<int> to(2 * N - 2), once(2 * N - 2), mult(2 * N - 2);
vector<vector<int>> graph(N);
for (int i = 0; i < N - 1; ++i) {
int a, b, c, d;
std::cin >> a >> b >> c >> d;
a -= 1, b -= 1;
to[2 * i] = b;
to[2 * i + 1] = a;
once[2 * i] = once[2 * i + 1] = c;
mult[2 * i] = mult[2 * i + 1] = d;
graph[a].push_back(2 * i);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |