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.|

RGB7519 - Өсөх эсэх

Өгөгдсөн нэг хэмжээст массив өсөхөөр эрэмбэлэгдсэн бол YES үгүй бол NO гэж хэвлэ.

Input

Эхний мөрөнд массивын элэментийн тоо өгөгдөнө. n<=100.

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

Output

Эрэмбэлэгдсэн бол YES үгүй бол NO гэж хэвлэнэ.

Example

Input 1:
5
2 5 100 230 999
Output 1:
YES
Input 2:
6
2 5 100 100 230 999
Output 2:
NO

Нэмсэн:Bataa
Огноо:2013-02-21
Хугацааны хязгаарлалт: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
Эх сурвалж:2013 он RGB7 Онлайн 1

hide comments
2024-04-13 19:32:33


Last edit: 2024-04-13 19:34:50
2023-12-13 01:09:58
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, a[100], x=1, i;
cin>>n;
for(i=1;i<=n;i++) cin>>a[i];
for(i=1;i<=n;i++){
if(a[i]>a[i-1]) x++;
}
if(x==n) cout<<"YES";
else cout<<"NO";
return 0;
}
2023-12-04 11:14:27
#include <iostream>
using namespace std;
int main(){
int a[100],i,j,n,k;
cin>>n;
for(i=1; i<=n; i++){
cin>>a[i];
}
for(i=1; i<=n-1; i++){
if(a[i]>=a[i+1]){
cout<<"NO";
return 0;
}
else{
if(i==n-1){
cout<<"YES";
return 0;
}
}
}
return 0;
}//Saihna bla
2023-03-06 04:01:08
huul bilguun suga min




































































































































































































































































































































#include <iostream>
using namespace std;
main(){
int a[1000],b,c=0,n,i,k;
cin>>n;
a[0];
for(i=1; i<=n; i++){
cin>>a[i];
}
for(i=1; i<=n; i++){
if(a[i]>a[i-1])
c++;
}
if(c==n) cout<<"YES";
else cout<<"NO";
}
2023-03-06 03:58:56
bilguun mal mini mai shuu <3
2023-03-06 03:57:26
sugu enhulei mai chuu :)
2020-06-18 04:36:32
. .
. .
. . .
. . .
. .
. .
2019-04-02 11:01:21
#include<cstdio>
#include<cmath>
using namespace std;
int a[1001];
int n, i;
int main(){
scanf("%d", &n);
for( i=1; i<=n; i++)
scanf("%d", &a[i]);

bool bo=1;
for( i=1; i<n; i++)
if( a[i]>=a[i+1] ) bo=0;

if( bo==1 ) printf("YES");
else printf("NO");

return 0;
}
2018-07-06 11:02:54
shaal hud b n shde
2018-03-14 09:52:04
mai suguudaa
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.