結果

問題 No.2758 RDQ
ユーザー hiro1729hiro1729
提出日時 2024-05-17 21:23:45
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 415 bytes
コンパイル時間 4,177 ms
コンパイル使用メモリ 261,844 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-17 21:24:25
合計ジャッジ時間 36,260 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 TLE -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 AC 2 ms
6,940 KB
testcase_21 AC 2 ms
6,940 KB
testcase_22 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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);
	}
}
0