Submission #206941

# Submission time Handle Problem Language Result Execution time Memory
206941 2020-03-06T00:57:05 Z oko Dreaming (IOI13_dreaming) C++14
0 / 100
59 ms 5624 KB
#include<bits/stdc++.h>
#include "dreaming.h"
using namespace std;
const long long mod=1e9+7;
int n,m,l;
multiset<int>ms;
int travelTime(int N, int M, int L, int A[], int B[], int T[])
{
    n=N,m=M,l=L;
    for(int i=0;i<m;i++)ms.insert(T[i]);
    if(m==0)
    {
        if(n==1)return 0;
        if(n==2)return l;
        else return l+l;
    }
    if(m==1)
    {
        if(n==2)return l+T[0];
        else return l+max(l,T[0]);
    }
    else
    {
        int mx=*--ms.end();
        ms.erase(--ms.end());
        int mxx=*--ms.end();
        return mx+l+mxx;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 59 ms 5624 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 59 ms 5624 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 59 ms 5624 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 22 ms 2428 KB Output is correct
2 Incorrect 25 ms 2680 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 59 ms 5624 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 59 ms 5624 KB Output isn't correct
2 Halted 0 ms 0 KB -