The “Lorem ipsum” test requires that the program behave in a way that is contrary to the specification.
Hi @rrossney,
The characters which are not in the intervals [a-z] or [A-Z] will be shown as a question mark in ASCII art.
… and the ASCII art representation of ‘?’ is read from standard input.
For a simple problem it sure gave me a lot of trouble. I use C.
- scanf(%s, …) terminates on a blank, so I wasn’t reading past ‘Lorem’
- Line Feed characters show up in unexpected places. Throw them away.
- I had to read and throw away one character before reading the target string.
I think the difficulty of tests is determined more by the “algorithmic” view of what should be done. And sure that isn’t a very complicated algorithm problem. However, I agree that parsing this one (and the defibrilators one) may be tricky
Hello, while trying to solve this puzzle in C++ language, I’ve clicked the reset button and now the initial code is totally different from the one I’ve got at first (it includes something about “Hello world”). Is it a bug or it’s meant that way?
That’s probably a bug…
I tried to open the puzzle, modify the code and then press the reset button and I obtain the expected source:
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
int main()
{
int L;
cin >> L; cin.ignore();
int H;
cin >> H; cin.ignore();
string T;
getline(cin, T);
for (int i = 0; i < H; i++) {
string ROW;
getline(cin, ROW);
}
// Write an action using cout. DON'T FORGET THE "<< endl"
// To debug: cerr << "Debug messages..." << endl;
cout << "answer" << endl;
}
Stuck on the Lorem Ipsum test case. I’d like to know what output it expects -_-
I’ve tried handling spaces, limiting length/height/number characters via the constraints, and exiting early if constraints are violated. Will update if I figure it out, looks like I’m not the only one having problems.
Do you guys having a problem too with the last test case (MANATHAN with an other ascii representation).
When printing one by one each char received for the ASCII alphabet, i got at some point :
45 (which is -)
4 (which is EOT)
… (i don’t know what the hell is that)
(here i just got a blank, i can’t figure out how a char can’t have a decimal value)
45 (which is -)
If you have an idea about what is going on…
Thanks in advance.
The size of output you can see is limited. So if you write too much in the error stream, it will be cut and you’ll see only the beginning, the end and “…” in the middle.
You forgot about the characters between ‘a’ and ‘z’. Still, are you sure that this solved the Lorem Ipsum case?
It took me approximately 90 minutes but I got a 100% when I submitted my solution. I am using C++ for my ‘game language’
Here is my solution, it worked 100% of the time when I submitted it…
EDIT: No full code please
Well, the problem goes like this:
I wrote this program in c:
EDIT: no full code please
While you may say that my code is less elegant (and also less efficient), it does, as far as I can see, give the same results. For testing purposes, I locally used this file as an input (with the forums formatting this may get transformed into something weird, either way, the letters that I used are from the examples):
4
5
Lorem ipsum dolor sit amet,...
# ## ## ## ### ### ## # # ### ## # # # # # ### # ## # ## ## ### # # # # # # # # # # ### ###
# # # # # # # # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # #
### ## # # # ## ## # # ### # # ## # ### # # # # ## # # ## # # # # # # ### # # # ##
# # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ### # # # #
# # ## ## ## ### # ## # # ### # # # ### # # # # # # # # # ## # ### # # # # # # ### #
So, after testing both programs with this example, and comparing the results with diff, the output was exactly the same. Still, I somehow fail at Lorem Ipsum, in scoring, and, it seems that you do not. I’m aware that I might have some bug somewhere, but somehow I miss it.
IDK, at a glance it seems correct to me though it is “busier” than mine so the logic is harder to separate. I’d collapse the arrays since the loop for 0 to H-1 happens twice. It really needs to only happen once and that lets your variable be ROW[1024]. Perhaps a character that you didn’t expect is creeping into the input. Maybe some debug printing of the T[k] will shed some light.
Got an issue: Submit fail. It s not the good submit
Can you rephrase please, it’s not clear enough
My solution passes all tests, but fails on all validation tests. That’s wierd
EDIT: no full code please
Mon code passe tous les jeux de tests, mais quand je l’envoie, j’obtiens un beau 0%…
J’ai l’impression qu’il y a comme un bug à l’envoi…
I think validation is broken for this puzzle.
Validation is broken for some problems, we will fix this problem as soon as possible.