HQNP2 - HQNP Incomputable Hard
See problem HQNP for description.
Score : Score is number of test cases correctly solved.
Limits
Any HQ0-9+−INCOMPUTABLE?! program (output for each case) must be at most 20,000 commands long. The accumulator is unbounded (it can store an arbitrarily large integer). After each command, the buffer must be at most 20,000 characters long. To prevent code injection vulnerabilities, during the execution of your program( output for each case ) the buffer must never contain non-alphanumeric characters, i.e. characters other than A-Z, a-z, and 0-9. If it happens, your score for that particular test case will be 0.
Additionally for this challenge you must use the command '+' at least once for each test case.
Input
First line has integer T i.e. number of test cases. ( T <= 1000 ). Next T lines has a number n ( 0 <= n <= 10^1000 ).
Output
For each n, output the required HQ0-9+−INCOMPUTABLE?! program( having '+' at least once ) which will give n as output. If there are multiple solutions, output any one of them. Output of each test case must be in a single line. If you don't want to solve a test case, leave a blank line for it.
PS : Number of test cases in 11 test files are respectively -> 10, 10, 100, 1000, 80, 20, 40, 500, 100, 50, 200
Update (Dec/5/2012) : A small bug in judge which was causing internal error has been fixed. With refinement in test files, all solutions have been rejudged.
hide comments
XeRoN!X:
2012-12-06 06:27:15
@Robert and Béla, i have fixed the judge ( indeed the bug was in handling command 'a'). I have also updated the test cases. Sorry for the inconvenience.
|
|
Robert Gerbicz:
2012-12-06 06:27:15
OK, my guess is that the author's code is broken for the 'a' command. There should be no problem for ha+\n. (it is rarely solves the problem, I'm printing only '\n' for cases that I can't solve.) |
|
Béla Mérvadó:
2012-12-06 06:27:15
Hi Robert,
|
|
Robert Gerbicz:
2012-12-06 06:27:15
RE: Béla, the judge has roughly 1 minute to check your solution. (this is not the time limit, this is fixed on every problem). You can clearly see that on this problem the output can be large, and checking the solution is harder than just reading it.
|
|
Béla Mérvadó:
2012-12-06 06:27:15
hai
|
|
Jeroen Bransen:
2012-12-06 06:27:15
There also seems to be a problem with the score calculation. When attempting to solve more testcases my score has gone down, while I am sure that I only replaced empty lines by non-empty lines. This should either give a runtime error or the score should be the same or go up.
|
|
Jeroen Bransen:
2012-12-06 06:27:15
Are you sure the input data is formatted correctly? I had some problems getting a trivial solution accepted (just reading input data).
|
Added by: | XeRoN!X |
Date: | 2011-12-27 |
Time limit: | 0.200s-2s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Variation of IPSC Problem |