0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ABC132 C - Divide the Problems を解いた

Posted at

abc132_1.png
abc132_2.png
abc132_3.png

ABCの数 == ARCの数ならば、N は必ず偶数となる。
じゃあ、半分にして、つなぎ目を比較すれば答えでは!?

abc132c.py
N = int(input())
lis = list(map(int,input().split()))

lis.sort()

ans = lis[N//2]-lis[N//2-1]

print(ans)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?