# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
231935 | ruler | 여행하는 상인 (APIO17_merchant) | C++14 | 71 ms | 1400 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// IOI 2021
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ends ' '
#define die(x) return cout << x << endl, 0
#define all(v) v.begin(), v.end()
#define sz(x) (int)(x.size())
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) { cerr << ends << H; debug_out(T...); }
#define debug(...) cerr << "{" << #__VA_ARGS__ << "}:", debug_out(__VA_ARGS__)
typedef long long ll;
typedef pair<int, int> pii;
const int INF = 2e9;
const ll MOD = 1e9 + 7;
////////////////////////////////////////////////////////////////////
const int N = 1e2 + 5, K = 1e3 + 5;
int n, m, t, B[N][K], S[N][K], D[N][N], V[N][N];
ll C[N][N];
bool OK(int q) {
for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) C[i][j] = 1LL * q * D[i][j] - V[i][j];
for (int k = 1; k <= n; k++) for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) C[i][j] = min(C[i][j], C[i][k] + C[k][j]);
for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) if (i != j && C[i][j] + C[j][i] <= 0) return true;
return false;
# | 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... |