結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-21 17:59:54 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 235 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 20,908 KB |
| 最終ジャッジ日時 | 2026-09-17 19:08:52 |
| 合計ジャッジ時間 | 3,887 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 RE * 9 |
ソースコード
from bisect import *
N,X = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
ans = 0
for i in range(N):
b = bisect_left(A,X-A[i])
if A[i]+A[b] == X:
br = bisect_right(A,X-A[i])
ans += (br-b)
print(ans)