SMPSEQ7  Fun with Sequences (Act 5)
You are given S  a sequence of n integers S = s_{1}, s_{2}, ..., s_{n}. Please, compute if it is possible to split S into two parts: s_{1}, s_{2}, ..., s_{i} and s_{i+1}, s_{i+2}, ..., s_{n} (1 <= i < n) in such a way that the first part is strictly decreasing while the second is strictly increasing one.
Input data specification
In the first line you are given an integer 2<=n<=100
and in the following line n integers
100 <= s_{i} <= 100.
Output data specification
One word Yes or No.
Example 1
Input: 5 1 2 1 1 1 Output: No
Example 2
Input: 6 3 1 2 2 1 3 Output: Yes
Example 3
Input: 6 2 2 1 0 1 2 Output: No
hide comments
arunsai63:
20170126 19:15:06
got accepted after a few tries...


gary771016:
20160923 17:24:55
@d73_221b


d73_221b:
20160905 11:37:23
In example 3,


lekov:
20160702 22:10:50
4 3 2 1 3 2 1


endlesik:
20160517 20:29:20
I can't get it pass the judge too, but strangely  for each given example algorithm did well in visual studio.. No idea what is wrong. 

mayank_06:
20160515 13:59:29
My logic was that


mauro8707_java:
20160506 01:45:17
How can I see the test proccess? I can't figure it out why my algorithm doesn't work. 

pailuf_42:
20160302 16:07:41
@raghavdua For n it says 2<=n<=100, so I'm guessing you are allowed to do that. 

tty5hy:
20160113 19:46:57
If no,There should be more than 2 same number? 

Nallagatla Manikanta:
20151026 05:24:32
@raghavdua yes it is correct to split in that way. 
Added by:  kuszi 
Date:  20131212 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 