Chef And Bamboo
Chef has given us the problem ,as he wants to check our intelligence level.Problem is we have given number of bamboo's as N and they are labelled according to their weight and the weight value of each bamboo should be lied in the range including 1 to N.It depends upon you, which value we will select,as all of the bamboo should have a unique weight and there value must lie within 1 to N ,Repetition of the weights will not be allowed as well as weights should be in integer form .
chef will give you the two inputs N total number of bamboos present and X the total weight of all bamboos and your task is to check whether it possible to make such stock of bamboo in such a way that they satisfied above conditions.
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows."
- first line of each test case contains two space separated variable N and X
- For each test case, print a single line containing the string "yes" if it's possible to finish the patent case or "no" otherwise (without quotes).
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 10000
- 1 ≤ X ≤ 100000
Input: 2 10 55 5 16 Output: yes no
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, 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, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions