답안 #503986

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
503986 2022-01-09T11:56:42 Z Abrar_Al_Samit 비밀 (JOI14_secret) C++17
0 / 100
462 ms 4424 KB
#include "secret.h"
#include <vector>
using namespace std;

vector<vector<int>>sp(1001, vector<int>(11));
void Init(int N, int A[]) {
  for(int i=0; i<N; ++i) {
    sp[i][0] = A[i];
  }
  for(int j=1; j<11; ++j) {
    for(int i=0; i+(1<<j)-1<N; ++i) {
      sp[i][j] = Secret(sp[i][j-1], sp[i+(1<<j)][j-1]);
    }
  }
}

int Query(int L, int R) {
  int len = R-L+1;
  int id = L;
  int ret = 0;
  for(int j=0; j<11; ++j) if(len>>j&1) {
    ret = Secret(ret, sp[id][j]);
    id += 1<<j;
  }
  return ret;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 111 ms 2480 KB Wrong Answer: Query(222, 254) - expected : 34031541, actual : 826490937.
2 Incorrect 115 ms 2488 KB Wrong Answer: Query(60, 375) - expected : 669221184, actual : 561164737.
3 Incorrect 117 ms 2424 KB Wrong Answer: Query(211, 401) - expected : 674373968, actual : 68571140.
4 Incorrect 416 ms 4424 KB Wrong Answer: Query(90, 497) - expected : 397934825, actual : 360185875.
5 Incorrect 440 ms 4360 KB Wrong Answer: Query(587, 915) - expected : 752404486, actual : 125355344.
6 Incorrect 420 ms 4356 KB Wrong Answer: Query(915, 915) - expected : 282904741, actual : 278446241.
7 Incorrect 462 ms 4424 KB Wrong Answer: Query(84, 976) - expected : 742463504, actual : 209881104.
8 Incorrect 425 ms 4404 KB Wrong Answer: Query(58, 987) - expected : 20022464, actual : 219511816.
9 Incorrect 426 ms 4420 KB Wrong Answer: Query(33, 967) - expected : 676869696, actual : 943723021.
10 Incorrect 428 ms 4424 KB Wrong Answer: Query(116, 961) - expected : 68487362, actual : 339853636.