All submissions for this problem are available.
Joe has found a strange stone on his way back home.
At night he had a strange dream. He was on a mountain,
on front of his were rows and columns of strange stones, in sequence
smaller to bigger both along row and columns in a square.A mystic voice called out
'Can you find out the stone of the same size as yours, if you do
your's is a powerful magic Pair Stone!! Joe was standing in the
corner where the stone was the smallest.
Find out if Joe has the Pair Stone or not.Time is running out !!!
M contains the rows(integer)
N is the size of the stone Joe has and is integral in value
Input the square found in the mountain
A single line giving the output 'YES' or 'NO' without any inverted commas
Should contain all the constraints on the input data that you may have. Format it like:
- 1 ≤ M ≤ 100
- 1 ≤ N ≤ 10^7
Input: 4 56 3 19 29 31 46 53 63 78 82 92 107 119 121 134 147 157 Output: NO
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions