結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-27 01:45:17 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 92 ms / 2,000 ms |
| + 932µs | |
| コード長 | 213 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 81,352 KB |
| 実行使用メモリ | 97,788 KB |
| 最終ジャッジ日時 | 2026-10-06 21:31:31 |
| 合計ジャッジ時間 | 3,846 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
from bisect import bisect_left, bisect_right
n, x = map(int, input().split())
a = sorted(list(map(int, input().split())))
ans = 0
for i in a:
ans += bisect_right(a, x - i) - bisect_left(a, x - i)
print(ans)