# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
218683 | EntityIT | 한자 끝말잇기 (JOI14_kanji) | C++14 | 207 ms | 17748 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#include "Annalib.h"
#define all(x) (x).begin(), (x).end()
#define sz(x) ( (int)(x).size() )
using LL = long long;
template<class T>
inline bool asMn(T &a, const T &b) { return a > b ? a = b, true : false; }
template<class T>
inline bool asMx(T &a, const T &b) { return a < b ? a = b, true : false; }
const LL infLL = 4e18;
void Anna(int N, int M, int A[], int B[], LL C[], int Q, int S[], int T[], int K, int U[]) {
vector<vector<LL> > d(N, vector<LL>(N, infLL) );
for (int u = 0; u < N; ++u) d[u][u] = 0;
for (int i = 0; i < M; ++i) d[ A[i] ][ B[i] ] = C[i];
for (int i = 0; i < K; ++i) d[ A[ U[i] ] ][ B[ U[i] ] ] = infLL;
for (int w = 0; w < N; ++w) {
for (int u = 0; u < N; ++u) {
for (int v = 0; v < N; ++v) {
asMn(d[u][v], d[u][w] + d[w][v]);
}
}
}
vector<int> group(Q, -1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |