Submission #3617107


Source Code Expand

import sys
n = int(input())
a = list(map(int, input().split()))

a.sort()
ra = a.copy()
a = a[0::2]
ra = ra[1::2]
ra.reverse()
a = ra + a
for i in range(n):
    if a[i] != abs(n - 1 - i * 2):
        print(0)
        sys.exit(0)
print(2 ** (n // 2) % 1000000007)

Submission Info

Submission Time
Task C - Lining Up
User mashinosatoshi
Language C++14 (GCC 5.4.1)
Score 0
Code Size 276 Byte
Status CE

Compile Error

./Main.cpp:1:1: error: ‘import’ does not name a type
 import sys
 ^