제출 #53148

#제출 시각아이디문제언어결과실행 시간메모리
53148okaybody10Secret (JOI14_secret)C++98
6 / 100
6716 ms4764 KiB
#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;i++) B[i]=A[i];
    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));
}

컴파일 시 표준 에러 (stderr) 메시지

secret.cpp: In function 'int Query(int, int)':
secret.cpp:16:9: warning: unused variable 'mid' [-Wunused-variable]
     int mid=(L+R)/2;
         ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...