# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
293576 | phillip | Pinball (JOI14_pinball) | C++14 | 1086 ms | 512 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>
#define ll long long
#define fast cin.tie(0);cout.tie(0);
#define order ios::sync_with_stdio(0);ios_base::sync_with_stdio(0);
#define pb push_back
using namespace std;
int n,m,a[200009],b[200009],c[200009];
ll d[200009],ans;
ll mxv=1e9;
ll bt(int x,int l,int r)
{
if(x==-1)
{
if(l==1&&r==n)return 0;
else return mxv;
}
ll ret=mxv;
ret=bt(x-1,l,r);
if(l<=c[x]&&c[x]<=r)ret=min(ret,d[x]+bt(x-1,min(l,a[x]),max(r,b[x])));
return ret;
}
int main()
{
fast order
mxv*=mxv;
cin>>m>>n;
for(int i=0;i<m;i++)cin>>a[i]>>b[i]>>c[i]>>d[i];
ans=mxv;
for(int i=0;i<m;i++)
{
# | 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... |