제출 #128402

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1284022019-07-10 21:39:12keko37여행하는 상인 (APIO17_merchant)C++14
100 / 100
143 ms2296 KiB
#include<bits/stdc++.h>
using namespace std;
typedef long long llint;
const int MAXN = 105;
const int MAXP = 1005;
const llint INF = 1000000007LL;
llint n, m, p;
llint buy[MAXN][MAXP], sell[MAXN][MAXP];
llint d[MAXN][MAXN], g[MAXN][MAXN];
llint cost[MAXN][MAXN];
void ispis () {
for (int i=1; i<=n; i++) {
for (int j=1; j<=n; j++) {
cout << g[i][j] << " ";
}
cout << endl;
}
}
bool moze (llint t) {
if (t == 0) return 1;
for (int i=1; i<=n; i++) {
for (int j=1; j<=n; j++) {
cost[i][j] = t * d[i][j] - g[i][j];
if (d[i][j] == INF) cost[i][j] = INF * INF;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...