Submission #77262

# Submission time Handle Problem Language Result Execution time Memory
77262 2018-09-24T13:08:07 Z MohamedAhmed0 Secret (JOI14_secret) C++14
0 / 100
618 ms 4772 KB
#include <bits/stdc++.h>
using namespace std ;
#include "secret.h"
int arr[100001] ;
#define MAX_VALUE        1000000000

void Init(int N, int A[])
{
    for(int i = 0 ; i < N ; ++i)
        arr[i] = A[i] ;
}
int Query(int l, int r)
{
    int x = arr[l] ;
    for(int i = l+1 ; i <= r ; ++i)
    {
        int X = x , Y = arr[i] ;
        x = (X + 2 * (Y / 2) < MAX_VALUE) ? (X + 2 * (Y / 2)) : MAX_VALUE ;
    }
    return x ;
}
# Verdict Execution time Memory Grader output
1 Incorrect 161 ms 2440 KB Wrong Answer: Query(222, 254) - expected : 34031541, actual : 1000000000.
2 Incorrect 158 ms 2548 KB Wrong Answer: Query(60, 375) - expected : 669221184, actual : 1000000000.
3 Incorrect 168 ms 2668 KB Wrong Answer: Query(211, 401) - expected : 674373968, actual : 1000000000.
4 Incorrect 605 ms 4668 KB Wrong Answer: Query(90, 497) - expected : 397934825, actual : 1000000000.
5 Incorrect 591 ms 4668 KB Wrong Answer: Query(587, 915) - expected : 752404486, actual : 1000000000.
6 Incorrect 589 ms 4668 KB Wrong Answer: Query(738, 741) - expected : 983692994, actual : 1000000000.
7 Incorrect 615 ms 4712 KB Wrong Answer: Query(84, 976) - expected : 742463504, actual : 1000000000.
8 Incorrect 607 ms 4712 KB Wrong Answer: Query(58, 987) - expected : 20022464, actual : 1000000000.
9 Incorrect 596 ms 4712 KB Wrong Answer: Query(33, 967) - expected : 676869696, actual : 1000000000.
10 Incorrect 618 ms 4772 KB Wrong Answer: Query(116, 961) - expected : 68487362, actual : 1000000000.