← Back to topics
Topic

knights

d
demjan0001
what did i do wrong in this task ???
t
turgond
I am wondering the same thing, but I'll check when I recover from the maths competition :D
d
demjan0001
how many points did you have on maths competition ?
i had 12 points :D, and i am going forward :D
a
adminModerator
you didnt sort the output correctly
o
oduleodule

Aha, not what I mean. Admin answer You.
t
tgudlek
This is my input:

	scanf( "%s", unos );
pair <int, int> kralj = poz( (string) unos );
mapa[ kralj.first ][ kralj.second ] = 1;
scanf( "%s", unos );
pair <int, int> konj = poz( (string) unos );
while( scanf( "%s", unos ) == 1 ){
pair <int, int> tmp = poz( (string) unos );
mapa[ tmp.first ][ tmp.second ] = 1;
}
d
demjan0001
???
i am not sure that i understand you ...

"If there is more than one field to which the Knight can move, then output the fields in clockwise order starting with 12hrs (straight up)"

so what is wrong with:
int nr[8] = { -2, -1, 1, 2, 2, 1, -1, -2 };
int nc[8] = { 1, 2, 2, 1, -1, -2, -2, -1 };
???
b
boris4
same test cases are wrong here too...

i have same arrays...


int const dx[] = { -2, -1, 1, 2, 2, 1, -1, -2 };
int const dy[] = { 1, 2, 2, 1, -1, -2, -2, -1 };

i don't understand what is wrong.
t
tgudlek
I inputed using while loop with scanf() == 1 as case.

int dX[] = { -2, -1, 1, 2, 2, 1, -1, -2 };
int dY[] = { 1, 2, 2, 1, -1, -2, -2, -1 };

A
Amtrix
Eejj... Now i have 0 points on knights, whats happening xD
t
turgond
I think we just have the different input.

Demjan, I had 39, am going to regional, i even have some chance of making it to the nationals :D
d
demjan0001
@turgond: i don't have big chance to go to the nationals competition in math, but i will try ... :D

i figured out what is wrong with my code,
in input comes first columns and then rows ...
and i am looking that chess table begin in top left corner, not in down left corner ... :D
o
oduleodule
@Demijan: This is silly mistake, but much better to make it now then on regional or some upper.

And if You fail in mathematics to go through, don't worry. You and brother will sure go to top on this field. As I see You both work very hard and I'm impressed by improvement both of you make.

Go on! I bet on You!
d
demjan0001
@oduleodule: thx
i am going on mathematics just to see how much i know ...

and one mistake it's not demijan it's demjan :D
everyone think that my name is demijan, it's rarely name here and in world i think :D
t
turgond
I never heard of Demijan, but I know a couple of Demjans :D Btw, has anyone heard anything about Serbia starting to compete at CEOI? I heard some rumors
d
demjan0001
i haven't heard about that, but that would be great ...
t
turgond
The supposed rumor is, but that's only what my friend heard, is that 1-4 from SIO goes to CEOI and IOI, and 5-8 get to go to BOI as a consolidation prize :D
n
nemanja1990
Just wait for Sloba to confirm :-)
t
turgond
I hope he will :D
b
boba5551
As far as I know, there is no change about Serbia and CEOI, so Serbia will not participate at CEOI. If I hear about any change, I will let you know ;) and I will check it very soon.
t
turgond
hahah :D so he was talking rubbish :D
b
boba5551
Maybe not :) We try to do something in order to compete at CEOI. Don't worry about it, Komisija will to make best for you.
t
turgond
Cool, thanks :)