結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
sho_00
|
| 提出日時 | 2020-04-08 22:34:59 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0) |
| 結果 |
AC
|
| 実行時間 | 186 ms / 2,000 ms |
| + 206µs | |
| コード長 | 215 bytes |
| 記録 | |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 21,416 KB |
| 実行使用メモリ | 24,568 KB |
| 最終ジャッジ日時 | 2026-08-18 03:03:17 |
| 合計ジャッジ時間 | 6,180 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
sho_00