結果

問題 No.854 公平なりんご分配
ユーザー CuriousFairy315CuriousFairy315
提出日時 2019-02-22 18:16:40
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 398 bytes
コンパイル時間 896 ms
コンパイル使用メモリ 55,360 KB
実行使用メモリ 10,908 KB
最終ジャッジ日時 2024-05-04 03:38:56
合計ジャッジ時間 59,661 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,656 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 1 ms
6,944 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 2 ms
6,940 KB
testcase_15 AC 2 ms
6,940 KB
testcase_16 AC 2 ms
6,944 KB
testcase_17 AC 2 ms
6,944 KB
testcase_18 AC 2 ms
6,940 KB
testcase_19 AC 1 ms
6,940 KB
testcase_20 AC 2 ms
6,944 KB
testcase_21 AC 2 ms
6,944 KB
testcase_22 AC 4 ms
6,944 KB
testcase_23 AC 3 ms
6,944 KB
testcase_24 AC 6 ms
6,944 KB
testcase_25 AC 3 ms
6,944 KB
testcase_26 AC 7 ms
6,940 KB
testcase_27 AC 4 ms
6,940 KB
testcase_28 AC 4 ms
6,944 KB
testcase_29 AC 2 ms
6,940 KB
testcase_30 AC 3 ms
6,940 KB
testcase_31 AC 6 ms
6,944 KB
testcase_32 AC 301 ms
6,940 KB
testcase_33 AC 524 ms
6,940 KB
testcase_34 AC 1,716 ms
6,940 KB
testcase_35 AC 890 ms
6,940 KB
testcase_36 AC 120 ms
6,944 KB
testcase_37 AC 296 ms
6,940 KB
testcase_38 AC 144 ms
6,944 KB
testcase_39 TLE -
testcase_40 AC 627 ms
6,940 KB
testcase_41 AC 906 ms
6,940 KB
testcase_42 AC 1,287 ms
6,944 KB
testcase_43 AC 1,907 ms
6,944 KB
testcase_44 AC 2,187 ms
6,940 KB
testcase_45 AC 775 ms
6,940 KB
testcase_46 TLE -
testcase_47 AC 532 ms
6,940 KB
testcase_48 AC 1,044 ms
6,940 KB
testcase_49 AC 851 ms
6,940 KB
testcase_50 AC 185 ms
6,940 KB
testcase_51 TLE -
testcase_52 AC 1,620 ms
6,944 KB
testcase_53 AC 713 ms
6,940 KB
testcase_54 AC 1,786 ms
6,944 KB
testcase_55 AC 332 ms
6,940 KB
testcase_56 AC 194 ms
6,940 KB
testcase_57 AC 528 ms
6,944 KB
testcase_58 AC 605 ms
6,940 KB
testcase_59 AC 170 ms
6,940 KB
testcase_60 AC 840 ms
6,940 KB
testcase_61 AC 119 ms
6,940 KB
testcase_62 AC 847 ms
6,940 KB
testcase_63 AC 826 ms
6,944 KB
testcase_64 AC 101 ms
6,944 KB
testcase_65 AC 668 ms
6,944 KB
testcase_66 AC 390 ms
6,940 KB
testcase_67 AC 1,415 ms
6,944 KB
testcase_68 AC 878 ms
6,944 KB
testcase_69 AC 182 ms
6,940 KB
testcase_70 AC 259 ms
6,944 KB
testcase_71 AC 343 ms
6,944 KB
testcase_72 AC 177 ms
6,940 KB
testcase_73 AC 617 ms
6,944 KB
testcase_74 AC 2,577 ms
6,944 KB
testcase_75 AC 574 ms
6,940 KB
testcase_76 AC 1,937 ms
6,940 KB
testcase_77 AC 1,975 ms
6,940 KB
testcase_78 AC 1,100 ms
6,940 KB
testcase_79 AC 1,901 ms
6,940 KB
testcase_80 AC 1,777 ms
6,940 KB
testcase_81 AC 1,288 ms
6,944 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.cpp:4:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    4 | main(){
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;

main(){
int n;
cin >> n;
long long int a[n+1];
long long int b[n+1];
a[0]=1;
//b[0]=1;
for(int i=1;i<=n;i++){
cin >> a[i];
//b[i]=b[i-1]*a[i];
}
int q;
cin >> q;
int p,l,r;
for(int i=0;i<q;i++){
cin >> p >> l >> r;
int x=1;
for(int i=l;i<=r;i++){
x=x*a[i]%p;
}
if( x==0 ){
cout << "Yes" <<endl;
}else{
cout << "NO" <<endl;
}
}

} // 前テスターコード
0