結果
問題 | No.2592 おでぶなおばけさん 2 |
ユーザー | ochiaigawa |
提出日時 | 2023-12-20 12:04:41 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 904 bytes |
コンパイル時間 | 2,080 ms |
コンパイル使用メモリ | 208,548 KB |
実行使用メモリ | 15,872 KB |
最終ジャッジ日時 | 2024-09-27 09:45:44 |
合計ジャッジ時間 | 21,848 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | RE | - |
testcase_06 | AC | 44 ms
7,552 KB |
testcase_07 | AC | 47 ms
7,296 KB |
testcase_08 | AC | 57 ms
9,728 KB |
testcase_09 | AC | 22 ms
6,940 KB |
testcase_10 | AC | 15 ms
6,944 KB |
testcase_11 | AC | 61 ms
9,984 KB |
testcase_12 | AC | 13 ms
6,940 KB |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | RE | - |
testcase_30 | RE | - |
testcase_31 | RE | - |
testcase_32 | RE | - |
testcase_33 | RE | - |
testcase_34 | RE | - |
testcase_35 | RE | - |
testcase_36 | RE | - |
testcase_37 | AC | 150 ms
15,616 KB |
testcase_38 | AC | 153 ms
15,744 KB |
testcase_39 | AC | 149 ms
15,616 KB |
testcase_40 | AC | 144 ms
15,616 KB |
testcase_41 | AC | 133 ms
15,616 KB |
testcase_42 | AC | 129 ms
15,744 KB |
testcase_43 | RE | - |
testcase_44 | RE | - |
testcase_45 | RE | - |
testcase_46 | RE | - |
testcase_47 | RE | - |
testcase_48 | RE | - |
testcase_49 | RE | - |
testcase_50 | RE | - |
testcase_51 | RE | - |
testcase_52 | RE | - |
testcase_53 | RE | - |
testcase_54 | RE | - |
testcase_55 | RE | - |
testcase_56 | RE | - |
testcase_57 | WA | - |
testcase_58 | RE | - |
testcase_59 | RE | - |
testcase_60 | RE | - |
testcase_61 | RE | - |
testcase_62 | RE | - |
testcase_63 | RE | - |
testcase_64 | RE | - |
testcase_65 | RE | - |
testcase_66 | RE | - |
testcase_67 | RE | - |
testcase_68 | RE | - |
testcase_69 | RE | - |
testcase_70 | RE | - |
testcase_71 | RE | - |
testcase_72 | RE | - |
testcase_73 | RE | - |
testcase_74 | AC | 2 ms
6,940 KB |
testcase_75 | RE | - |
testcase_76 | RE | - |
testcase_77 | RE | - |
testcase_78 | RE | - |
testcase_79 | RE | - |
testcase_80 | RE | - |
testcase_81 | RE | - |
testcase_82 | RE | - |
testcase_83 | RE | - |
ソースコード
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") using namespace std; vector<long long> m = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43}; const int sz = m.size(); int main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); int N, Q, K; cin >> N >> Q >> K; vector<long long> A(N); for(int i = 0; i < N; i++) { cin >> A[i]; } vector<vector<long long>> C(sz, vector<long long>(N + 1)); vector<long long> p(sz, 1); for(int i = 0; i < N; i++) { for(int j = 0; j < sz; j++) { C[j][i + 1] = (C[j][i] + A[i] % m[j] * p[j] % m[j] + m[j]) % m[j]; p[j] = p[j] * K % m[j]; } } while(Q--) { int L, R; cin >> L >> R; --L; bool fn = true; for(int i = 0; i < sz; i++) { if(C[i][R] - C[i][L] != 0) { fn = false; } } cout << (!fn ? "Yes\n" : "No\n"); } return 0; }