# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
230037 | MetB | Travelling Merchant (APIO17_merchant) | C++14 | 383 ms | 4344 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>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define N 1000003
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const ll INF = 1e17, MOD = INF + 7, MOD2 = 1e6 + 3;
ll un_dist[100][100], deal[100][100];
ll sell[100][1000], buy[100][1000], n, m, k;
ld d[100][100];
bool check (int x) {
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++) {
if (un_dist[i][j] == INF) d[i][j] = -INF;
else d[i][j] = (ld) deal[i][j] - (ld) x * un_dist[i][j];
}
for (int k = 0; k < n; k++)
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
Compilation message (stderr)
# | 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... |