# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
567709 | shahriarkhan | Travelling Merchant (APIO17_merchant) | C++14 | 714 ms | 3376 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 ;
const int MX_N = 105 , MX_K = 1005 ;
const long long INF = 1e9 + 5 ;
long long dist[MX_N][MX_N] , best[MX_N][MX_N] , buy[MX_N][MX_K] , sell[MX_N][MX_K] ;
pair<long long , long long> profit[MX_N][MX_N] ;
pair<long long , long long> f(pair<long long , long long> x , pair<long long , long long> y)
{
if((x.first*y.second)>(y.first*x.second)) return x ;
else if((x.first*y.second)<(y.first*x.second)) return y ;
else if(x.first>y.first) return x ;
else return y ;
}
int main()
{
int n , m , k ;
pair<long long , long long> ans = {0,0} ;
scanf("%d%d%d",&n,&m,&k) ;
for(int i = 1 ; i <= n ; ++i)
{
for(int j = 1 ; j <= k ; ++j)
{
scanf("%lld%lld",&buy[i][j],&sell[i][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... |