# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
31222 | chonka | Watching (JOI13_watching) | C++98 | 736 ms | 17780 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<stdio.h>
#include<algorithm>
using namespace std ;
#define MAXN 2007
int n , p , q ;
int a[ MAXN ] ;
int dp[ MAXN ][ MAXN ] ;
int small[ MAXN ] ;
int big[ MAXN ] ;
int coef1 , coef2 ;
bool f ( int x ) {
int i , j ;
j = 1 ;
for ( i = 1 ; i <= n ; i ++ ) {
while ( j <= n && ( a[ j ] - a[ i ] + 1 ) <= coef1 * x ) {
j ++ ;
}
j -- ;
small[ i ] = j ;
}
j = 1 ;
for ( i = 1 ; i <= n ; i ++ ) {
while ( j <= n && ( a[ j ] - a[ i ] + 1 ) <= coef2 * x ) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |