結果

問題 No.2812 Plus Minus Blackboard
ユーザー hato336hato336
提出日時 2024-07-19 22:11:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 767 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 82,188 KB
実行使用メモリ 117,860 KB
最終ジャッジ日時 2024-07-21 20:27:39
合計ジャッジ時間 4,834 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
85,628 KB
testcase_01 AC 119 ms
85,660 KB
testcase_02 AC 117 ms
85,504 KB
testcase_03 AC 167 ms
117,860 KB
testcase_04 AC 151 ms
105,768 KB
testcase_05 AC 159 ms
117,200 KB
testcase_06 AC 130 ms
92,032 KB
testcase_07 AC 130 ms
90,252 KB
testcase_08 AC 131 ms
89,856 KB
testcase_09 AC 156 ms
111,544 KB
testcase_10 AC 129 ms
89,720 KB
testcase_11 AC 150 ms
103,348 KB
testcase_12 AC 142 ms
99,912 KB
testcase_13 AC 166 ms
117,744 KB
testcase_14 AC 133 ms
94,264 KB
testcase_15 AC 128 ms
89,780 KB
testcase_16 AC 157 ms
114,424 KB
testcase_17 AC 133 ms
95,076 KB
testcase_18 AC 132 ms
92,128 KB
testcase_19 AC 149 ms
108,724 KB
testcase_20 AC 128 ms
89,500 KB
testcase_21 AC 165 ms
117,516 KB
testcase_22 AC 157 ms
114,196 KB
testcase_23 AC 114 ms
85,256 KB
testcase_24 AC 113 ms
85,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
#n = int(input())
#
#alist = []
#s = input()
n = int(input())
a = list(map(int,input().split()))
if min(a) <= sum(a) <= max(a):
    print('Yes')
else:
    print('No')
exit()
input = sys.stdin.readline
t = int(input())
for i in range(t):
    n = int(input())
    a = list(map(int,input().split()))
    cnt = n
    x = sum(1 if j % 2 == 0 else 0 for j in a)
    for j in range(1000000):
        if cnt % 2 == 0:
            if x == 0:
                print(['Bob','Alice'][j % 2])
                break
            x -= 1
            cnt += 1
        else:
            cnt -= 1
    
0