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
2023-03-16 09:02:24

#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;
}
saikhnaa gay
2023-03-14 14:34:30
burmaa huuuul
#include<stdio.h>
#include<stdlib.h>
main()
{
int a[1000];
int n,i,s=0,t=0;
scanf("%d",&n);
for(i=1;i<=n;i++){

scanf("%d",&a[i]);
}
for(i=1;i<=n;i++)
if(a[i]%2==1){
s++;}
if(a[i]%2==0)
{t++;}
if(s>t){

printf("YES");
}else
{
printf("NO");
}
}
2023-03-14 14:33:50
hiiiiiiii
2023-03-02 07:23:30
...

Last edit: 2023-03-02 07:27:15
2023-02-17 02:57:59
ZA BAYRLALAA PRO AGAA
2023-02-17 02:57:41
#include<stdio.h> MUNHJIN SUGA BANIDAA MAI UUNIIG HUUL
int main ()
{
int i, n, t=0, s=0, a[1000];
scanf("%d",&n);
for(i=1; i<=n; i++)
scanf("%d",&a[i]);
for(i=1; i<=n; i++)
{
if(a[i]%2==0) t=t+1;
else s=s+1;
}

if(s>t) printf("YES");
else printf("NO");

return 0;
}
2022-11-21 12:22:52
dunked on
2022-10-24 05:33:30
#include<bits/stdc++.h>
using namespace std;
long a[100];
main(){
int i, n, s=0, t=0, w=0;
// t = tegsh
// s = sondgoi
cin >> n;
for (i=0; i<n; i++){
cin >> a[i];
}
for (i=0; i<n; i++){
if(a[i]%2==0){
t++;
} else {
w++;
}

}
if (t<w) cout << "YES" << endl;
else cout << "NO" << endl;
}
//biti hulara
2022-09-01 12:14:30
#include<stdio.h>
int main ()
{
int num1 ,num2, a[1000], l=0, c=0;
scanf("%d", &num1);
for( int i=0; i<num1; i++)
{
scanf("%d", &a[i]);

}
for(int i=0; i<num1 ; i++)
{
if(a[i]%2==0)
{
l++;
}
else if(a[i]%2==1)
{
c++;
}
}
if(c>l)
{
printf("YES");
}
else if(l>c)
{
printf("NO");
}

}
Ганзориг Энгүүнбаяр
2022-07-29 08:09:35
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n,a[10000],i,s=0,p=0;
cin>>n;
for(i=0;i<n;i++)
cin>>a[i];
for(i=0;i<n;i++)
if(a[i]%2==0) s=s+1;
else if(a[i]%2==1) p=p+1;
if(s<p) cout<<"YES";
else cout<<"NO";
return 0;
}

boljiin goy yum oo
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.