Search found 36 matches

Mon Jun 06, 2005 3:49 pm
Forum: Volume 1 (100-199)
Topic: 159 - Word Crosses
Replies: 32
Views: 4160

159 WA why?

i do the following: - take 4 words - find out which one of 2 vertical words is longer - form a array of chars (polje[20][20]) - fill it very carefully with spaces and letters of every word - print out that array here is my code, everything seems to be in order, did i miss somethin'? cheers, dootzky ...
Tue May 31, 2005 12:42 am
Forum: Volume 1 (100-199)
Topic: 154 - Recycling
Replies: 29
Views: 3861
damn ppl, this problem was really really badly described. if it waren't for "almost human" dude, i would've never get ACC. someone should do a better job when describing problems, like in volumes 600,700,etc. first couple of volumes has terrible, terrible descriptions. thx for the help, &q...
Mon May 30, 2005 12:05 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 28539

aaaaah

thx mon, i really though there's something else wrong, but now i see that it was my typo.

cheers,
dootzky
Fri May 27, 2005 12:24 pm
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 28539

yup

exactly! :o therefore, how come that my code is ACCEPTED?! anyway, the problem description says "maximum sum", and since i declare MAX as 0 (max=0), and all numbers in the array are negative, the MAXIMUM of all negative is still - 0. ?? i dunno if this makes any sense at all, or better yet...
Wed May 18, 2005 10:48 pm
Forum: Volume 1 (100-199)
Topic: 114 - Simulation Wizardry
Replies: 80
Views: 9270

114

why SIGSEGV?? here is my code, it's little bit pointless to explain what i did, 'cause i simply SIMULATE the whole pinball thang :roll: thx for any help, dootzky #include <iostream.h> int i,j,m,n,x,y,a,b,c,d; int wall_cost,way,life,points,total_points; int value[200][200],cost[200][200]; char polje[...
Fri May 13, 2005 2:08 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 28539
and really, "58050zz" asked a really good question, that even i don't uderstand, besides my ACC. :o if input is: -1 5 5 5 0 0 5 0 0 my code would go something like: first elemet - B[0][0] = -1 ok, it's negative, skip it! and all the other test would be less then 19.. no?! BUT!! (there's al...
Fri May 13, 2005 2:02 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 28539

OMG!

i don't know how - i don't know why - BUT this logic by "imlazy" is an imperative!! i mean - OMG!! my program was returning TLE, and it was expected, because i was doing brute force O(n^6) - [what ever that may mean, i saw others use these terms, so i assume it's some time/complexity mark....
Wed May 11, 2005 7:56 pm
Forum: Volume 103 (10300-10399)
Topic: 10363 - Tic Tac Toe
Replies: 54
Views: 25691

FINALY!

this is how i solved the problem, after 9 WA. :( if ( X && O ) goto no; if ( X && (a==b+1) ) goto yes; if ( X && (a!=b+1) ) goto no; if ( O && (a==b) ) goto yes; if ( O && (a!=b) ) goto no; if ( (a==b) || (a==b+1) ) goto yes; else goto no; // check out yes: co...
Wed May 11, 2005 7:54 pm
Forum: Volume 103 (10300-10399)
Topic: 10363 - Tic Tac Toe
Replies: 54
Views: 25691

finaly, a good solution!

this is how i solved the problem, after 9 WA. :( if ( X && O ) goto no; if ( X && (a==b+1) ) goto yes; if ( X && (a!=b+1) ) goto no; if ( O && (a==b) ) goto yes; if ( O && (a!=b) ) goto no; if ( (a==b) || (a==b+1) ) goto yes; else goto no; // check out yes: co...
Wed May 11, 2005 1:32 am
Forum: Volume 102 (10200-10299)
Topic: 10284 - Chessboard in FEN
Replies: 11
Views: 12275

hmmmm

i fried my brain with this problem, and i hope this hint helps: http://online-judge.uva.es/board/viewtopic.php?p=34674#34674 that's my own post there, i was talking to myself! :P and got ACC, ofcourse! :lol: but, about your program: - it seems to me that you don't initialize ALL the 'squares' of you...
Wed May 11, 2005 1:31 am
Forum: Volume 102 (10200-10299)
Topic: 10284 - Chessboard in FEN
Replies: 11
Views: 12275
it was kind a fun talking with my self, actually!

i'm a gonna go talk to notepad for a while now..

just messing with ya all,
respect,
dootzky
Wed May 11, 2005 1:15 am
Forum: Volume 102 (10200-10299)
Topic: 10284 - Chessboard in FEN
Replies: 11
Views: 12275

thank you, thank you, very much...

i must say - i'm very impressed how many of you replyed on my question. :-? :cry: anyway, i found my own error. it was naive, ofcourse. the similar problem i mentioned, p10196, was all about these conditions: 1) if the white king is in check 2) if the black king is in check 3) if none of them is in ...
Mon May 09, 2005 11:51 am
Forum: Volume 103 (10300-10399)
Topic: 10363 - Tic Tac Toe
Replies: 54
Views: 25691
oh, i see what you mean... :o my bad, my bad. it was late, and i was so sure i got it right. :-? anyhow, i corrected my algorithm now, and this is how i check the table: 1) if they both win - NO - break; 2) if X wins && (numberO+1 == numberX) - YES - else NO; break; 3) if O wins && (...
Sun May 08, 2005 11:05 pm
Forum: Volume 103 (10300-10399)
Topic: 10363 - Tic Tac Toe
Replies: 54
Views: 25691

10363

OMG OMG OMG!! why doesn't this work?! :evil: it's very very simple: 1) check if number of "X" is equal or 1 bigger from number of "O" 2) check if somebody wins. if they both win - print "no". else print "yes". so, if 1), go to 2), and 2) is really simple. it's...
Sun May 08, 2005 3:03 am
Forum: Volume 103 (10300-10399)
Topic: 10346 - Peter's Smokes
Replies: 46
Views: 17443
really funny. i would normaly solve this problem with a simulation, but hence the formula is now well known, i did it with ONE LINE?! omg. void main () { long k,n; while (cin >> n >> k) cout << n+ ((n-1)/(k-1)) << endl; } seriously, this is funny. :lol: ofcoruse, line above this line is #include <is...