i get presentation error on test 11 on problem 304 sgu(http://acm.sgu.ru/problem.php?contest=0&problem=304) my biggest problem is i dont know what pe exactly is !! can anyone help ?? this is my code http://paste.ubuntu.com/6489024/
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
i get presentation error on test 11 on problem 304 sgu(http://acm.sgu.ru/problem.php?contest=0&problem=304) my biggest problem is i dont know what pe exactly is !! can anyone help ?? this is my code http://paste.ubuntu.com/6489024/
Название |
---|
PE means that the output doesn't follow the format. For example, you don't output anything or output "-1" instead of "Impossible" or vice-versa. For this task, you can for example, output 3 on first line, then != 3 numbers on the second.
UPD. Looked in your code, in the task you shold output the indeces of teeth, but in the loop you can output "-1"
ok thanks the -1 is because i wanted to get WA if the problem was with the loop but its still PE :| (i mean at first i submitted the code without the if statement in the loop and it had pe i dont realy know what the problem is but any how thanks :) )
In most of judging systems PE means your output is fine but you don't print it the right way, this usually happens when you print some extra spaces or new-lines, or you don't print them when they are needed. also nic11 mentioned that extra output and similar mistakes can cause this error.
If you have noticed, Codeforces always suggests to use
cin
orcout
or%I64d
instead of%lld
if you are using a 64-bit variable, they might also be the case for this error.thanks :)
As the others says ... Presentation Error means you don't follow the rules of problem for white spaces ( include newlines and spaces ).
In your solution you print one space after each number instead of splitting them with spaces for simplifying,but you have an extra space at the line of numbers which coz presentation error in most judges (codeforces doesn't have PE).
If you add this small change in your code it will be accepted.