結果
| 問題 |
No.2758 RDQ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-17 21:23:45 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 415 bytes |
| コンパイル時間 | 4,304 ms |
| コンパイル使用メモリ | 261,276 KB |
| 実行使用メモリ | 17,220 KB |
| 最終ジャッジ日時 | 2024-12-20 13:10:33 |
| 合計ジャッジ時間 | 46,740 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 TLE * 16 |
ソースコード
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, Q, L, R, K;
scanf("%d %d", &N, &Q);
int A[N];
for (int i = 0; i < N; i++) scanf("%d", &A[i]);
while (Q--) {
scanf("%d %d %d", &L, &R, &K);
int cnt = 0;
for (int i = L - 1; i < R; i++) {
if (A[i] % K == 0) cnt++;
}
printf("%d\n", cnt);
}
}