結果
問題 | No.1043 直列大学 |
ユーザー | komkompi |
提出日時 | 2020-05-02 00:21:39 |
言語 | PyPy3 (7.3.13) |
結果 |
WA
|
実行時間 | - |
コード長 | 656 bytes |
コンパイル時間 | 972 ms |
コンパイル使用メモリ | 87,160 KB |
実行使用メモリ | 111,156 KB |
最終ジャッジ日時 | 2023-08-26 17:48:03 |
合計ジャッジ時間 | 7,403 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 80 ms
78,376 KB |
testcase_01 | AC | 83 ms
78,300 KB |
testcase_02 | AC | 82 ms
78,392 KB |
testcase_03 | AC | 84 ms
78,504 KB |
testcase_04 | AC | 78 ms
78,336 KB |
testcase_05 | AC | 83 ms
78,152 KB |
testcase_06 | AC | 78 ms
78,360 KB |
testcase_07 | AC | 87 ms
78,436 KB |
testcase_08 | AC | 81 ms
78,628 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 250 ms
88,176 KB |
testcase_15 | AC | 297 ms
99,104 KB |
testcase_16 | AC | 224 ms
85,936 KB |
testcase_17 | AC | 147 ms
79,476 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 121 ms
78,568 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
ソースコード
N,M=map(int,input().split()) V=list(map(int,input().split())) R=list(map(int,input().split())) A,B=map(int,input().split()) dp_V=[0]*(10**5+1) dp_V[0]=1 for v in V: for i in range(len(dp_V))[::-1]: if dp_V[i]!=0: dp_V[i+v]+=dp_V[i] dp_R=[0]*(10**5+1) dp_R[0]=1 for r in R: for i in range(len(dp_R))[::-1]: if dp_R[i]!=0: dp_R[i+r]+=dp_R[i] col_R=[0]*(10**5+1) col_R[0]=0 for i in range(1,len(dp_R)): col_R[i]=col_R[i-1]+dp_R[i] #print(dp_V) #print(col_R) ans=0 for i in range(1,len(dp_V)): low=-(-i//B) high=i//A ans+=(col_R[high]-col_R[low-1])*dp_V[i] print(ans)