0
0

More than 1 year has 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