Subject link: http://acm.hdu.edu.cn/showproblem.php?pid=1506
#include
using namespace std;
const int N=1e5+7;
typedef long long ll;
ll arr[N];
int main(){
int n;
while(cin>>n,n){
s
Subject link: http://acm.hdu.edu.cn/showproblem.php?pid=1506
#include
using namespace std;
const int N=1e5+7;
typedef long long ll;
ll arr[N];
int main(){
int n;
while(cin>>n,n){
s