# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
371248 | uacoder123 | Raisins (IOI09_raisins) | C++14 | 1197 ms | 34028 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 std;
using namespace __gnu_pbds;
#define F first
#define S second
#define FOR(i,a,b) for (auto i = (a); i <= (b); ++i)
#define NFOR(i,a,b) for(auto i = (a); i >= (b); --i)
#define all(x) (x).begin(), (x).end()
#define sz(x) lli(x.size())
#define mp(i,a) make_pair(i,a)
#define pb(a) push_back(a)
#define bit(x,b) (x&(1LL<<b))
typedef int lli;
typedef pair <lli,lli> ii;
typedef pair <ii,lli> iii;
typedef vector <lli> vi;
typedef tree<lli,null_type,less<lli>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
ii dp[50][50][50][50];
int arr[50][50],n,m;
ii cal(int r1,int c1,int r2,int c2)
{
if(dp[r1][c1][r2][c2].F>0)
return dp[r1][c1][r2][c2];
if(r1==r2&&c1==c2)
{
dp[r1][c1][r2][c2]=mp(0,arr[r1][c1]);
return dp[r1][c1][r2][c2];
}
dp[r1][c1][r2][c2]=mp(1000*25000,1000*25000);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |