Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7503 - Сондгой нь их үү

Нэг хэмжээст массив дахь сондгой тоонууд нь тэгш тоонуудаасаа их бол YES, үгүй бол NO гэж хэвлэ.

Input

Эхний мөрөнд массив дахь элементийн тоо.

Дараагийн мөрүүдэд массивын элементүүд нэг нэгээрээ өгөгдөнө.

Output

Сондгой нь их бол YES, үгүй бол NO.

Example

Input:
5
2
3
4
1
7
Output: YES

Нэмсэн:Bataa
Огноо:2013-01-15
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2024-04-08 04:31:03
xaмгийн mэHэг ni
2024-04-08 04:29:44
uh12



2023-12-31 12:29:43
import java.util.Scanner;

public class Think {
public static void main(String[] args) throws java.lang.Exception {
Scanner in = new Scanner(System.in);
int a = in.nextInt();

int[] b = new int[a];
int i = 0;
int j = 0;
int u = 0;
while (i < a) {
b[i] = in.nextInt();

if (b[i] % 2 == 0) {
j++;
}
if (b[i] % 2 == 1) {
u++;
}
i = i + 1;
}
if (u > j) {
System.out.println("YES");
} else {
System.out.print("NO");
}
}
}
2023-12-14 11:07:23
alan shuuuuuuuuu lalruda
2023-11-29 10:28:55
#include <iostream>

using namespace std;

int main()
{
int n, a[100], s=0, b=0;
cin >> n;
for (int i=0; i<n; i++){
cin >> a[i];
if(a[i]%2==0){
s=s+a[i];
}
else{
b=b+a[i];
}

}
if(b>s){
cout << "YES";
}
else{
cout << "NO";
}
return 0;

}
2023-11-13 10:11:52
#include <iostream>
int main() {
int n;
std::cin>>n;
int a[n];
int max=0;
int min=0;
for(int m=0; m<n; m++){
std::cin>>a[m];
if(a[m]%2==1){
max++;
}else{
min++;
}
}
if(max>min){
std::cout<<"YES";
}else{
std::cout<<"NO";
}

return 0;
}
2023-07-18 08:25:37
#include <iostream>
using namespace std;
int main() {
long long int i, s = 0, t = 0, n;
cin >> n;
int mas[n];
for (i = 0; i < n; i++) {
cin >> mas[i];
if (mas[i] % 2 == 0) t += mas[i];
else s += mas[i];
}
if (t > s) cout << "NO";
else cout << "YES";
return 0;
}
2023-03-20 17:55:04
#include <bits/stdc++.h>
#define ll long long

using namespace std;

int main() {

ll n , ans = 0 , sum = 0 ;

cin >> n ;

ll a [ n + 1 ] ;

for ( int i = 1 ; i <= n ; i ++ ) {

cin >> a [ i ] ;

}

ans = a [ 1 ] ;

for ( int i = 1 ; i <= n ; i ++ ) {

if ( a [ i ] % 2 == 0 )

ans += a [ i ] ;

else

sum += a [ i ] ;

}
if ( ans > sum )

cout << "NO" ;

else

cout << "YES" ;

return 0 ;

} fb : Temuk
2023-03-16 09:15:40
#include <iostream>
using namespace std;
int main() {
int n;
float numbers[100];
cin >> n;
for (int i=0; i<n; i++){
cin >> numbers[i] ;
}
for(int i=1; i<n; i++){
if(numbers[0] < numbers[i])
numbers[0] = numbers[i];
}
cout << numbers[0];
return 0;
}
#include <iostream>
using namespace std;
int main() {
int n;
float numbers[100];
cin >> n;
for (int i=0; i<n; i++){
cin >> numbers[i] ;
}
for(int i=1; i<n; i++){
if(numbers[0] > numbers[i])
numbers[0] = numbers[i];
}
cout << numbers[0];
return 0;
}
andaa
2023-03-16 09:14:06

#include <iostream>
using namespace std;

int main() {
long long int i, s = 0, t = 0, n;
cin >> n;
int mas[n];
for (i = 0; i < n; i++) {
cin >> mas[i];
if (mas[i] % 2 == 0) t += mas[i];
else s += mas[i];
}
if (t > s) cout << "NO";
else cout << "YES";
return 0;
}
andaa bodooroi
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.