結果

問題 No.1682 Unfair Game
ユーザー asumo0729
提出日時 2021-10-11 21:54:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 707 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 82,220 KB
実行使用メモリ 54,912 KB
最終ジャッジ日時 2024-09-16 03:11:05
合計ジャッジ時間 2,202 ms
ジャッジサーバーID
(参考情報)
judge6 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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