Submit | All submissions | Best solutions | Back to list |
Problem hidden on 2014-03-14 19:11:21 by Francky
SMRTR - Are You Smarter than a fifth Grader |
The Problem is to find are you smarter than a fifth grader or not. You will be given some number between 0 to 9 inclusive. You have to find the maximum and minimum number of nth digit can be generated with the numbers. Believe me or not the problem is taken from the math book of class six.
Input and Output
The input file contains several test cases. Each case contains a Number N(1<=N<=5000). [You have to take input untill end of file....] Next line contains N digits between 0 to 9 inclusive separated by one or more spaces. You can assume that at least one non zero number will exists in the input.
Print the maximum number and minimum number of Nth digits they made in two lines. See Sample input output for Exact format (there is no blank line between two lines of the problems in sample).
Example
Sample Input
5
1 3 2 5 4
Sample Output
54321
12345
Added by: | Kazi Sadlil Rhythm |
Date: | 2014-02-16 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
hide comments
|
|||||
2014-03-15 05:29:32 Bhavik
@francky: though it is just a suggestion try submitting your code in c/C++ with same logic where there is no such input problems...if it gets AC then you can prove that there is some problem with input... |
|||||
2014-03-15 05:29:32 Francky
Are all digits on a unique second line ? If no input should be reformatted. I think I handle all cases... but WA. --ans(eror)--> You didn't handle every case right.. You misunderstood something. Last edit: 2014-03-14 17:58:13 |
|||||
2014-03-15 05:29:32 Bhavik
all the solutions are now WA!! as far as input is concerned it asks us tor read till EOF so i think there is no problem with that --ans(eror)--> yeap u are right. One have to take input untill end of file.. and the wrong solution gets wrong answer now. they got one thing wrong.... getting tle with different way of inputting now:) original is better,haha and yeah i should have coded better but anyways AC matters Last edit: 2014-03-14 17:48:23 |
|||||
2014-03-15 05:29:32 Kazi Sadlil Rhythm
There was a glich in the data set.. So some wrong solution got Accpted... Now the problem is fixed and all the problem rejuged......... Sorry For my wrong data set....... --ans(Francky)--> Why a second rejudge ? If I may give an advice : the input should look like: 2 5 1 3 5 4 2 6 1 1 1 2 2 2 with T about 100, and N too. So that you use only one file. Just an advice. --ans(eror)--> sorry, now everything is ok.. i am sorry for my noviceness.. The input file will look like 5 1 2 3 4 5 4 1 2 3 4 2 1 2 one may need to take input until end of file.... Thnx For Your advice..... Last edit: 2014-03-14 17:41:52 |
|||||
2014-03-15 05:29:32 Kazi Sadlil Rhythm
Problem Updated.... @Francky --ans(Francky)--> OK, please explain your rejudge. --ans(eror)--> something wrong, some wrong solutions gets accepted.. i am trying to find out my eror.... Last edit: 2014-03-14 17:04:22 |
|||||
2014-03-15 05:29:32 Francky
Obviously a tutorial task. Moreover no need to restrict language. @pstetter : please reduce input file, if need, so that slow language can get AC. Bad complexity with fast language will have TLE in any case. You have to allow all languages. Problem hidden waiting for that. ans--> updated... Last edit: 2014-03-14 16:31:19 |
|||||
2014-03-15 05:29:32 Bhavik
no need for fast i/o to get accepted.. I think it will be moved to tutorial sooner.. Last edit: 2014-03-14 15:55:21 |
|||||
2014-03-15 05:29:32 sharad mahajan
easy one |