Submission #4612389


Source Code Expand

Copy
#C問題
from scipy import signal
import math
N=int(input())
A=[]
B=[]
for i in range(N):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)
ans=signal.fftconvolve(A,B)
print(0)
for x in ans:
    print(int(round(x)))

Submission Info

Submission Time
Task C - 高速フーリエ変換
User stng
Language Python (3.4.3)
Score 100
Code Size 243 Byte
Status
Exec Time 1366 ms
Memory 41296 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 00_sample_01
All 100 / 100 00_sample_01, 01_00_01, 01_01_19, 01_02_31, 01_03_22, 01_04_31, 01_05_40, 01_06_15, 01_07_39, 01_08_28, 01_09_30, 01_10_23, 01_11_33, 01_12_11, 01_13_28, 01_14_41, 01_15_26, 01_16_49, 01_17_34, 01_18_02, 01_19_33, 01_20_29, 02_00_51254, 02_01_82431, 02_02_17056, 02_03_34866, 02_04_6779, 02_05_65534, 02_06_65535, 02_07_65536, 02_08_65537, 02_09_65538, 02_10_100000
Case Name Status Exec Time Memory
00_sample_01 600 ms 36916 KB
01_00_01 324 ms 22556 KB
01_01_19 324 ms 22468 KB
01_02_31 328 ms 22472 KB
01_03_22 325 ms 22556 KB
01_04_31 325 ms 22436 KB
01_05_40 325 ms 22524 KB
01_06_15 326 ms 22440 KB
01_07_39 324 ms 22468 KB
01_08_28 324 ms 22540 KB
01_09_30 325 ms 22472 KB
01_10_23 326 ms 22460 KB
01_11_33 326 ms 22464 KB
01_12_11 326 ms 22444 KB
01_13_28 324 ms 22464 KB
01_14_41 327 ms 22464 KB
01_15_26 323 ms 22540 KB
01_16_49 327 ms 22484 KB
01_17_34 322 ms 22556 KB
01_18_02 324 ms 22432 KB
01_19_33 325 ms 22460 KB
01_20_29 324 ms 22528 KB
02_00_51254 878 ms 31148 KB
02_01_82431 1219 ms 39940 KB
02_02_17056 508 ms 26492 KB
02_03_34866 679 ms 30860 KB
02_04_6779 398 ms 23660 KB
02_05_65534 1026 ms 31616 KB
02_06_65535 1029 ms 31608 KB
02_07_65536 971 ms 31624 KB
02_08_65537 1015 ms 39856 KB
02_09_65538 1034 ms 40236 KB
02_10_100000 1366 ms 41296 KB