結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
s_shohei
|
| 提出日時 | 2020-04-16 22:51:17 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 42 ms / 2,000 ms |
| + 996µs | |
| コード長 | 248 bytes |
| 記録 | |
| コンパイル時間 | 71 ms |
| コンパイル使用メモリ | 80,384 KB |
| 実行使用メモリ | 83,968 KB |
| 最終ジャッジ日時 | 2026-09-09 01:00:25 |
| 合計ジャッジ時間 | 3,435 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
n,x = map(int, input().split())
a = list(map(int, input().split()))
mxa=max(a)
cnts=[0]*(mxa+1)
for i in range(n):
cnts[a[i]]+=1
ans=0
for i in range(mxa+1):
nokori = x-i
if 0<=nokori<=mxa:
ans+=cnts[i]*cnts[nokori]
print(ans)
s_shohei