結果
問題 |
No.723 2つの数の和
|
ユーザー |
![]() |
提出日時 | 2020-04-08 22:34:59 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 169 ms / 2,000 ms |
コード長 | 215 bytes |
コンパイル時間 | 79 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 20,740 KB |
最終ジャッジ日時 | 2024-07-19 05:47:08 |
合計ジャッジ時間 | 3,643 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
import bisect n,x=map(int,input().split()) a=sorted(list(map(int,input().split()))) ans=0 for i in range(n): v=x-a[i] if v<0: pass else: ans+=bisect.bisect_right(a,v)-bisect.bisect_left(a,v) print(ans)