logo AlgoBeat OnlineJudge
登录 注册

#101783. [BZOJ 1783] [Usaco2010 Jan]Taking Turns

内存限制:64 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:文本比较
上传者: 匿名

题目描述

Farmer John has invented a new way of feeding his cows. He lays out N (1

输入格式

  • Line 1: A single integer: N

  • Lines 2..N+1: Line i+1 contains a single integer: W_i

输出格式

  • Line 1: Two space-separated integers, the total weight of hay consumed by Bessie and Dessie respectively

样例

样例输入

6
17
5
9
10
3
8

样例输出

27 17