結果

問題 No.1682 Unfair Game
ユーザー asumo0729asumo0729
提出日時 2021-10-11 21:54:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 707 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 87,280 KB
実行使用メモリ 71,816 KB
最終ジャッジ日時 2023-10-14 08:02:40
合計ジャッジ時間 4,180 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
71,712 KB
testcase_01 AC 100 ms
71,676 KB
testcase_02 AC 104 ms
71,556 KB
testcase_03 AC 100 ms
71,372 KB
testcase_04 AC 104 ms
71,680 KB
testcase_05 AC 100 ms
71,560 KB
testcase_06 AC 102 ms
71,588 KB
testcase_07 AC 101 ms
71,532 KB
testcase_08 AC 101 ms
71,556 KB
testcase_09 AC 103 ms
71,612 KB
testcase_10 AC 102 ms
71,664 KB
testcase_11 AC 102 ms
71,536 KB
testcase_12 AC 102 ms
71,788 KB
testcase_13 AC 100 ms
71,816 KB
testcase_14 AC 103 ms
71,656 KB
testcase_15 AC 99 ms
71,776 KB
testcase_16 AC 99 ms
71,376 KB
testcase_17 AC 100 ms
71,592 KB
testcase_18 AC 101 ms
71,772 KB
testcase_19 AC 99 ms
71,556 KB
testcase_20 AC 99 ms
71,584 KB
testcase_21 AC 101 ms
71,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from operator import itemgetter
from collections import defaultdict, deque
import heapq
import bisect
import math

stdin=sys.stdin
sys.setrecursionlimit(10 ** 8)

ip=lambda: int(sp())
fp=lambda: float(sp())
lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()
Yp=lambda:print('Yes')
Np=lambda:print('No')
inf = 1 << 60
eps = 1e-9
sortkey1 = itemgetter(0)
sortkey2 = lambda x: (x[0], x[1])
mod = 10 ** 9 + 7

###############################################################

N = ip()
P = lp()
x = 0
y = 0

for i in range(N):
    if P[i] > 50:
        x += 1
    if P[i] < 50:
        y += 1

if x == 0:
    ans = 0
else:
    ans = pow(2, x + y - 1, mod)

print(ans)
0