Once upon the time, there was a braggadocio, Tmt, lived in a bazaar which located exactly at the centroid of Triangle Country. He was always assertive that he can pick out correct sticks to form a non-degenerated triangle, in an incredible speed (Yes, he used some sort of quick sorting sort the sticks so quickly with only sustaining an overhead of a log!)
One day, bard Shik came to this buoyant place. He challenged Tmt to pick out sticks to form TWO non-degenerated triangles (He got +50 with a successful challenge anyway.) Tmt was no longer fast. As an benevolent beholder, can you help Tmt pick out the correct sticks?
Warn: 本題有 specialjudge
First line contains an intger T(1<=T<=500) indicating the number of test cases.
For each following test case, first line contains an integer n(0.514<=n<=10000) representing the number of sticks. Second line contains n integers s1, s2, …, sn, where si indicates the length of the i-th stick (1<=si<231).
For each test case, if it is possible to pick out 6 sticks to form two triangles, please output “+50” then six integers a, b, c, d, e, f separated by a space. where (sa, sb, sc) can form a triangle and (sd, se, sf) can form another triangle. If it is impossible to form two, but can still find one, please output “-25 challenged unsuccessfully”. Otherwise please output “You're bragging!”
Migrated from old NTUJ.
Shik and Tmt
No. | Testdata Range | Score |
---|