text: Examples Input 5 5 13 0 4 0 1 5 2 1 2 3 2 3 1 4 0 4 3 4 Output YES 0 1 5 2 1 2 3 2 3 1 4 8 4 3 4 Input 2 1 123456789 0 1 0 1 0 Output YES 0 1 123456789 Input 2 1 999999999 1 0 0 1 1000000000 Output NO Note Here's how the graph in the first sample case looks like : <image> In the first sample case, there is only one missing edge weight.Placing the weight of 8 gives a shortest path from 0 to 4 of length 13.In the second sample case, there is only a single edge.Clearly, the only way is to replace the missing weight with 123456789.In the last sample case, there is no weights to assign but the length of the shortest path doesn't match the required value, so the answer is "NO".# Solution #include <bits/stdc++.h> using namespace std; int break_point() { char c; while ((c = getchar()) != '\n') ; return 0; } template <typename T> void read_integer(T &r) { bool sign = 0; r = 0; char c; while (1) { c = getchar(); if (c == '-') { sign = 1; break; } if (c != ' ' && c != '\n') { r = c - '0'; break; } } while (1) { c = getchar(); if (c == ' ' || c == '\n') break; r = r * 10 + (c - '0'); } if (sign) r = -r; } long long binpowmod(long long a, long long b, long long mod) { if (b == 0) return 1; long long c = binpowmod(a, b >> 1, mod); return (((c * c) % mod) * (b & 1 ?a : 1)) % mod; } long long binpow(long long a, long long b) { if (b == 0) return 1; long long c = binpow(a, b >> 1); return c * c * (b & 1 ?