답안 #53147

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
53147 2018-06-28T20:47:32 Z okaybody10 비밀 (JOI14_secret) C++
0 / 100
590 ms 5528 KB
#include <bits/stdc++.h>
#include "secret.h"
using namespace std;
typedef long long ll;
ll T[1006];
int B[1006];
void Init(int N,int A[])
{
    for(int i=0;i<N-1;i++) T[i]=Secret(A[i],A[i+1]); 
}
int Query(int L,int R)
{
    if(R==L) return B[L];
    if(R==L+1) return T[L];
    int mid=(L+R)/2;
    return Secret(Query(L,(L+R)/2),Query((L+R)/2+1,R));
}

Compilation message

secret.cpp: In function 'int Query(int, int)':
secret.cpp:15:9: warning: unused variable 'mid' [-Wunused-variable]
     int mid=(L+R)/2;
         ^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 156 ms 2552 KB Wrong Answer: Query(222, 254) - expected : 34031541, actual : 840248697.
2 Incorrect 159 ms 2676 KB Wrong Answer: Query(60, 375) - expected : 669221184, actual : 878813288.
3 Incorrect 172 ms 2700 KB Wrong Answer: Query(211, 401) - expected : 674373968, actual : 699676988.
4 Incorrect 579 ms 4912 KB Wrong Answer: Query(90, 497) - expected : 397934825, actual : 27410676.
5 Incorrect 558 ms 4912 KB Wrong Answer: Query(587, 915) - expected : 752404486, actual : 376061960.
6 Incorrect 554 ms 5180 KB Wrong Answer: Query(915, 915) - expected : 282904741, actual : 0.
7 Incorrect 567 ms 5240 KB Wrong Answer: Query(84, 976) - expected : 742463504, actual : 703173667.
8 Incorrect 565 ms 5240 KB Wrong Answer: Query(58, 987) - expected : 20022464, actual : 27622784.
9 Incorrect 563 ms 5372 KB Wrong Answer: Query(33, 967) - expected : 676869696, actual : 412224938.
10 Incorrect 590 ms 5528 KB Wrong Answer: Query(116, 961) - expected : 68487362, actual : 607374601.