Search found 36 matches
- Mon Jun 06, 2005 3:49 pm
- Forum: Volume 1 (100-199)
- Topic: 159 - Word Crosses
- Replies: 32
- Views: 6297
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: 5804
- Mon May 30, 2005 12:05 am
- Forum: Volume 1 (100-199)
- Topic: 108 - Maximum Sum
- Replies: 233
- Views: 46607
aaaaah
aah, i see your point.
very nice conclusion. my bad
thx mon, i really though there's something else wrong, but now i see that it was my typo.
cheers,
dootzky
very nice conclusion. my bad
![8)](./images/smilies/icon_cool.gif)
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: 46607
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: 14868
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: 46607
- Fri May 13, 2005 2:02 am
- Forum: Volume 1 (100-199)
- Topic: 108 - Maximum Sum
- Replies: 233
- Views: 46607
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: 30970
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: 30970
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: 13989
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: 13989
- Wed May 11, 2005 1:15 am
- Forum: Volume 102 (10200-10299)
- Topic: 10284 - Chessboard in FEN
- Replies: 11
- Views: 13989
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: 30970
- Sun May 08, 2005 11:05 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10363 - Tic Tac Toe
- Replies: 54
- Views: 30970
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: 21888
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...