Submission #9398093


Source Code Expand

Copy
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

MOD = 10 ** 9 + 7

N = int(readline())
A = np.array(read().split(),np.int64)

A.sort()
x = (A * np.arange(N+1,1,-1) % MOD).sum() % MOD
x *= pow(2, N+N-2, MOD); x %= MOD
print(x)

Submission Info

Submission Time
Task E - Change a Little Bit
User maspy
Language Python (3.4.3)
Score 500
Code Size 329 Byte
Status AC
Exec Time 305 ms
Memory 25240 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 3
AC × 25
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt AC 305 ms 20540 KB
02.txt AC 148 ms 12428 KB
03.txt AC 147 ms 12428 KB
04.txt AC 147 ms 12396 KB
05.txt AC 148 ms 12396 KB
06.txt AC 148 ms 12428 KB
07.txt AC 148 ms 12396 KB
08.txt AC 147 ms 12428 KB
09.txt AC 147 ms 12428 KB
10.txt AC 148 ms 12396 KB
11.txt AC 147 ms 12540 KB
12.txt AC 149 ms 12428 KB
13.txt AC 149 ms 12508 KB
14.txt AC 148 ms 12540 KB
15.txt AC 150 ms 12540 KB
16.txt AC 201 ms 24952 KB
17.txt AC 202 ms 24952 KB
18.txt AC 201 ms 24920 KB
19.txt AC 196 ms 24948 KB
20.txt AC 191 ms 24952 KB
21.txt AC 147 ms 12428 KB
22.txt AC 193 ms 25240 KB
s1.txt AC 148 ms 12428 KB
s2.txt AC 146 ms 12428 KB
s3.txt AC 147 ms 12428 KB