답안 #515126

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
515126 2022-01-19T03:42:03 Z triplem5ds 비밀 (JOI14_secret) C++14
0 / 100
556 ms 4424 KB
/// Zengy MANGA
#include "secret.h"
#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")

#include "bits/stdc++.h"

using namespace std;

#define pb push_back
#define F first
#define S second
#define f(i, a, b)  for(int i = a; i < b; i++)
#define all(a)  a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(x) (int)(x).size()
#define mp(x,y) make_pair(x,y)
#define popCnt(x) (__builtin_popcountll(x))

using ll = long long;
using ii = pair<int,int>;
using ull = unsigned long long;
using db = long double;

const int N = 1e3+5, LG = 18, MOD = 998244353;
const long double PI = acos(-1);
int tb[11][N];
int n, a[N];
int S[N];
void Init(int N, int A[]) {
    n = N;
    f(i,2,N)S[i] = S[i >> 1] + 1;
    f(i,0,n)    a[i] = A[i], tb[0][i] = a[i];
    for(int j = 1; j < 10; j++)
    for(int i = 0; i + (1 << j) <= n; i++)
        tb[j][i] = Secret(tb[j-1][i], tb[j-1][i+(1 << (j-1))]);
}
int Query(int l, int r) {
    if(l==r)
        return tb[0][l];
    int k = S[r-l+1];
    return Secret(tb[k][l], tb[k][r-(1 << k)+1]);
}
//void doWork() {
//
//
//
//
//}
//
//int32_t main() {
//#ifdef ONLINE_JUDGE
//    ios_base::sync_with_stdio(0);
//    cin.tie(0);
//#endif
//
//    int t = 1;
////    cin >> t;
//    while(t--) {
//        doWork();
//    }
//
//    return 0;
//}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 155 ms 2428 KB Wrong Answer: Query(222, 254) - expected : 34031541, actual : 839935006.
2 Incorrect 125 ms 2448 KB Wrong Answer: Query(60, 375) - expected : 669221184, actual : 73044041.
3 Incorrect 154 ms 2468 KB Wrong Answer: Query(211, 401) - expected : 674373968, actual : 951413062.
4 Incorrect 493 ms 4344 KB Wrong Answer: Query(90, 497) - expected : 397934825, actual : 889372840.
5 Incorrect 526 ms 4424 KB Wrong Answer: Query(587, 915) - expected : 752404486, actual : 389074008.
6 Incorrect 502 ms 4320 KB Wrong Answer: Query(738, 741) - expected : 983692994, actual : 582496659.
7 Incorrect 480 ms 4296 KB Wrong Answer: Query(84, 976) - expected : 742463504, actual : 709920818.
8 Incorrect 537 ms 4324 KB Wrong Answer: Query(58, 987) - expected : 20022464, actual : 225603928.
9 Incorrect 556 ms 4280 KB Wrong Answer: Query(33, 967) - expected : 676869696, actual : 819205962.
10 Incorrect 489 ms 4364 KB Wrong Answer: Query(116, 961) - expected : 68487362, actual : 538241930.