F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_27563277_1664.cpp: In function 'int main()':
0_0_27563277_1664.cpp:4:203: error: expected '}' at end of input
 using namespace std;int read() { int num = 0; char ch; while(ch = getchar()) {  if(ch >= '0' && ch <= '9')  (num *= 10) += ch - '0';  else   return num; }}int main() { int T, n, x, maxa, sum; T = read(); //printf("%d\n",T); while(T--) {  maxa = -1;  sum = 0;  n = read();  //printf("%d\n",n);  for(int i = 1;i <= n;i++) {   x = read();   //printf("%d\n",x);   sum += x;   if(x > maxa) maxa = x;  }  if(sum - maxa >= maxa - 1) printf("Yes\n");  else   printf("No\n"); }}
                                                                                                                                                                                                           ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-07-05 17:09:08, Gzip enabled