結果

問題 No.854 公平なりんご分配
ユーザー bal4ubal4u
提出日時 2019-07-27 05:04:46
言語 C
(gcc 12.3.0)
結果
TLE  
実行時間 -
コード長 552 bytes
コンパイル時間 1,296 ms
コンパイル使用メモリ 28,928 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-15 05:49:28
合計ジャッジ時間 58,317 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,376 KB
testcase_01 AC 0 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 0 ms
4,380 KB
testcase_05 AC 0 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 0 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,384 KB
testcase_13 AC 0 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 0 ms
4,380 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 0 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 0 ms
4,384 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 3 ms
4,376 KB
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 5 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 1 ms
4,380 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 4 ms
4,376 KB
testcase_32 AC 287 ms
4,380 KB
testcase_33 AC 495 ms
4,384 KB
testcase_34 AC 1,662 ms
4,380 KB
testcase_35 AC 858 ms
4,376 KB
testcase_36 AC 87 ms
4,384 KB
testcase_37 AC 279 ms
4,376 KB
testcase_38 AC 132 ms
4,376 KB
testcase_39 TLE -
testcase_40 AC 588 ms
4,380 KB
testcase_41 AC 870 ms
4,376 KB
testcase_42 AC 1,246 ms
4,376 KB
testcase_43 AC 1,839 ms
4,380 KB
testcase_44 AC 2,120 ms
4,376 KB
testcase_45 AC 701 ms
4,376 KB
testcase_46 TLE -
testcase_47 AC 505 ms
4,380 KB
testcase_48 AC 1,012 ms
4,376 KB
testcase_49 AC 824 ms
4,376 KB
testcase_50 AC 175 ms
4,380 KB
testcase_51 TLE -
testcase_52 AC 1,545 ms
4,384 KB
testcase_53 AC 674 ms
4,380 KB
testcase_54 AC 1,709 ms
4,380 KB
testcase_55 AC 312 ms
4,380 KB
testcase_56 AC 180 ms
4,376 KB
testcase_57 AC 496 ms
4,380 KB
testcase_58 AC 535 ms
4,380 KB
testcase_59 AC 157 ms
4,380 KB
testcase_60 AC 792 ms
4,376 KB
testcase_61 AC 94 ms
4,380 KB
testcase_62 AC 792 ms
4,380 KB
testcase_63 AC 771 ms
4,376 KB
testcase_64 AC 86 ms
4,380 KB
testcase_65 AC 643 ms
4,376 KB
testcase_66 AC 358 ms
4,380 KB
testcase_67 AC 1,358 ms
4,380 KB
testcase_68 AC 811 ms
4,380 KB
testcase_69 AC 173 ms
4,380 KB
testcase_70 AC 241 ms
4,380 KB
testcase_71 AC 321 ms
4,376 KB
testcase_72 AC 131 ms
4,376 KB
testcase_73 AC 593 ms
4,376 KB
testcase_74 AC 2,503 ms
4,384 KB
testcase_75 AC 541 ms
4,376 KB
testcase_76 AC 1,870 ms
4,380 KB
testcase_77 AC 1,915 ms
4,376 KB
testcase_78 AC 1,024 ms
4,380 KB
testcase_79 AC 1,827 ms
4,380 KB
testcase_80 AC 1,708 ms
4,380 KB
testcase_81 AC 1,245 ms
4,376 KB
testcase_82 TLE -
testcase_83 -- -
testcase_84 -- -
testcase_85 -- -
testcase_86 -- -
testcase_87 -- -
testcase_88 -- -
testcase_89 -- -
testcase_90 -- -
testcase_91 -- -
testcase_92 -- -
testcase_93 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘in’ 内:
main.c:7:14: 警告: 関数 ‘getchar_unlocked’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    7 | #define gc() getchar_unlocked()
      |              ^~~~~~~~~~~~~~~~
main.c:13:24: 備考: in expansion of macro ‘gc’
   13 |         int n = 0, c = gc();
      |                        ^~

ソースコード

diff #

// yukicoder: No.854 公平なりんご分配
// 2019.7.27 bal4u

#include <stdio.h>

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

int in() {   // 非負整数の入力
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

int a[100005], N;

int main()
{
	int i, t, Q, P, L, R;

	N = in(); for (i = 1; i <= N; i++) a[i] = in();
	Q = in(); while (Q--) {
		P = in(), L = in(), R = in();
		t = 1; for (i = L; i <= R; i++) t = (long long)t*a[i] % P;
		puts(t? "NO": "Yes");
	}
	return 0;
}
0