Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
B'You are given an array a_1, a_2, ldots, a_n . In one operation you can choose two elements a_i and a_j ( i ne j ) and decrease each of them by one. You need to check whether it is possible to make all the elements equal to zero or not. The first line contains a single integer n ( 2 <= n <= 10^5 ) -- the size of the array. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- the elements of the array. Print "YES" if it is possible to make all elements zero, otherwise print "NO". In the first example, you can make all elements equal to zero in 3 operations: In the second example, one can show that it is impossible to make all elements equal to zero. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
58280998 |
ruban |
B |
Aug. 4, 2019, 5:02 p.m. |
OK |
Delphi |
TESTS |
46 |
93 |
153497600 |
|
1500 |
58279647 |
Craspedacusta |
B |
Aug. 4, 2019, 4:59 p.m. |
OK |
FPC |
TESTS |
46 |
61 |
0 |
|
1500 |
58292768 |
ti19_btvan |
B |
Aug. 4, 2019, 5:42 p.m. |
OK |
FPC |
TESTS |
46 |
61 |
3993600 |
|
1500 |
58273891 |
LaSWeeG |
B |
Aug. 4, 2019, 4:46 p.m. |
OK |
FPC |
TESTS |
46 |
62 |
819200 |
|
1500 |
58299794 |
Zachary_260325_cpp |
B |
Aug. 4, 2019, 6:14 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
0 |
|
1500 |
58293128 |
_October_ |
B |
Aug. 4, 2019, 5:44 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
0 |
|
1500 |
58279780 |
Rachel_in |
B |
Aug. 4, 2019, 4:59 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
0 |
|
1500 |
58274958 |
eric161324 |
B |
Aug. 4, 2019, 4:48 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
0 |
|
1500 |
58284765 |
FengMing |
B |
Aug. 4, 2019, 5:13 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
409600 |
|
1500 |
58283386 |
yuy |
B |
Aug. 4, 2019, 5:09 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
409600 |
|
1500 |
58283258 |
codeplay0314 |
B |
Aug. 4, 2019, 5:08 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
409600 |
|
1500 |
58273729 |
Heartlessly |
B |
Aug. 4, 2019, 4:45 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
409600 |
|
1500 |
58272240 |
orzzcy |
B |
Aug. 4, 2019, 4:43 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
409600 |
|
1500 |
58270219 |
mahjong |
B |
Aug. 4, 2019, 4:38 p.m. |
OK |
GNU C++11 |
TESTS |
46 |
31 |
614400 |
|
1500 |
remove filters
Back to search problems