# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1018604 | vicvic | Self Study (JOI22_ho_t2) | C++11 | 278 ms | 11348 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 <iostream>
#include <fstream>
#include <climits>
#define int long long
using namespace std;
const int nmax=3e5+5;
int n, m, a[nmax], b[nmax];
bool check (int val)
{
int days=n*m;
for (int i=1;i<=n;i++)
{
int filled=0;
if (a[i]>b[i])
{
int nr_act=min (days, m);
if (!nr_act)
{
return 0;
}
if (LLONG_MAX/nr_act>a[i] && nr_act*a[i]<val)
{
days-=nr_act;
filled=nr_act*a[i];
}
else
{
days-=val/a[i]+(val%a[i]!=0);
continue;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |