Submission #1515783
Source Code Expand
# -*- coding: utf-8 -*- n = input() a = map(int, raw_input().split()) l, r = a[0], sum(a[1:]) min_diff = abs(l-r) for i in range(1,n-1): l += a[i] r -= a[i] diff = abs(l-r) min_diff = min(min_diff,diff) print(min_diff)
Submission Info
Submission Time | |
---|---|
Task | C - Splitting Pile |
User | kujira438x |
Language | Python (2.7.6) |
Score | 300 |
Code Size | 269 Byte |
Status | AC |
Exec Time | 185 ms |
Memory | 18440 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 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 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 10 ms | 2568 KB |
00_example_02.txt | AC | 10 ms | 2568 KB |
01.txt | AC | 91 ms | 10500 KB |
02.txt | AC | 41 ms | 5404 KB |
03.txt | AC | 34 ms | 4804 KB |
04.txt | AC | 113 ms | 12748 KB |
05.txt | AC | 33 ms | 4808 KB |
06.txt | AC | 185 ms | 18440 KB |
07.txt | AC | 173 ms | 18436 KB |
08.txt | AC | 172 ms | 18440 KB |
09.txt | AC | 185 ms | 18436 KB |
10.txt | AC | 177 ms | 18436 KB |
11.txt | AC | 10 ms | 2568 KB |
12.txt | AC | 12 ms | 2692 KB |
13.txt | AC | 170 ms | 16492 KB |
14.txt | AC | 10 ms | 2568 KB |