結果

問題 No.1944 ∞
ユーザー harurunharurun
提出日時 2022-05-20 22:40:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,741 bytes
コンパイル時間 690 ms
コンパイル使用メモリ 11,972 KB
実行使用メモリ 34,852 KB
最終ジャッジ日時 2023-10-20 13:28:05
合計ジャッジ時間 3,124 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,356 KB
testcase_01 WA -
testcase_02 AC 29 ms
10,356 KB
testcase_03 AC 30 ms
10,356 KB
testcase_04 AC 29 ms
10,356 KB
testcase_05 AC 29 ms
10,356 KB
testcase_06 AC 28 ms
10,356 KB
testcase_07 AC 29 ms
10,356 KB
testcase_08 AC 29 ms
10,356 KB
testcase_09 AC 29 ms
10,356 KB
testcase_10 AC 29 ms
10,356 KB
testcase_11 AC 29 ms
10,356 KB
testcase_12 AC 29 ms
10,356 KB
testcase_13 AC 30 ms
10,356 KB
testcase_14 AC 29 ms
10,356 KB
testcase_15 AC 99 ms
34,852 KB
testcase_16 AC 33 ms
12,080 KB
testcase_17 WA -
testcase_18 AC 31 ms
11,420 KB
testcase_19 AC 30 ms
10,708 KB
testcase_20 WA -
testcase_21 AC 34 ms
11,496 KB
testcase_22 AC 31 ms
11,032 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 32 ms
11,152 KB
testcase_29 AC 30 ms
10,576 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 70 ms
15,528 KB
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

class INPUT:
  def __init__(self):
    self._l=open(0).read().split()
    self._length=len(self._l)
    self._index=0
    return

  def stream(self,k=1,f=int,f2=False):
    assert(-1<k)
    if self._length==self._index or self._length-self._index<k:
      raise Exception("There is no input!")
    elif f!=str:
      if k==0:
        ret=list(map(f,self._l[self._index:]))
        self._index=self._length
        return ret
      if k==1 and not f2:
        ret=f(self._l[self._index])
        self._index+=1
        return ret
      if k==1 and f2:
        ret=[f(self._l[self._index])]
        self._index+=1
        return ret
      ret=[]
      for _ in [0]*k:
        ret.append(f(self._l[self._index]))
        self._index+=1
      return ret
    else:
      if k==0:
        ret=list(self._l[self._index:])
        self._index=self._length
        return ret
      if k==1 and not f2:
        ret=self._l[self._index]
        self._index+=1
        return ret
      if k==1 and f2:
        ret=[self._l[self._index]]
        self._index+=1
        return ret
      ret=[]
      for _ in [0]*k:
        ret.append(self._l[self._index])
        self._index+=1
      return ret
pin=INPUT().stream

#pin(number[default:1],f[default:int],f2[default:False])
#if number==0 -> return left all
#listを変数で受け取るとき、必ずlistをTrueにすること。


def main():
  N,X,Y=pin(3)
  R=pin(0)
  S=X*X+Y*Y
  if N==1:
    if R[0]**2==S:
      print("Yes")
    else:
      print("No")
    return
  t=R[0]
  if t*t<S:
    u=t*t-S
    p=2*sum(R[1:])
    if u>p:
      print("No")
    else:
      print("Yes")
    return    
  for i in range(1,N):
    t+=2*R[i]
  if t*t>=S:
    print("Yes")
  else:
    print("No")
  return

main()
0