2012-01-06T00:06:14 *** srgpqt has quit IRC (Quit: leaving) 2012-01-06T00:09:29 *** treeform has quit IRC (Remote host closed the connection) 2012-01-06T00:09:34 *** CowTipperVirus has joined #aichallenge 2012-01-06T00:13:10 *** ltriant has quit IRC (Ping timeout: 248 seconds) 2012-01-06T00:13:51 *** kapoc has joined #aichallenge 2012-01-06T00:26:34 *** grc48 has joined #aichallenge 2012-01-06T00:28:30 *** Fandekasp has joined #aichallenge 2012-01-06T00:28:54 *** xathis has quit IRC () 2012-01-06T00:31:33 *** dorisabayon has quit IRC (Ping timeout: 248 seconds) 2012-01-06T00:31:53 *** CowTipperVirus has quit IRC (Quit: Page closed) 2012-01-06T00:34:04 *** amstan has joined #aichallenge 2012-01-06T00:34:04 *** ChanServ sets mode: +o amstan 2012-01-06T00:35:07 *** TheLinker has quit IRC (Remote host closed the connection) 2012-01-06T00:40:47 *** treeform has joined #aichallenge 2012-01-06T00:48:14 *** Jak_o_Shadows1 has quit IRC (Ping timeout: 255 seconds) 2012-01-06T00:54:08 *** amstan has quit IRC (Ping timeout: 240 seconds) 2012-01-06T00:57:08 *** amstan has joined #aichallenge 2012-01-06T00:57:08 *** ChanServ sets mode: +o amstan 2012-01-06T00:58:40 Holy shi- Firaxis is remaking xcom?! 2012-01-06T01:00:58 Notch went crazy 2012-01-06T01:02:40 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-01-06T01:05:17 *** chris_0076 has joined #aichallenge 2012-01-06T01:05:35 *** chris_0076 has joined #aichallenge 2012-01-06T01:06:38 *** Garf has joined #aichallenge 2012-01-06T01:08:12 *** Jak_o_Shadows has joined #aichallenge 2012-01-06T01:14:39 *** grc48 has quit IRC (Quit: This computer has gone to sleep) 2012-01-06T01:29:29 *** amstan has quit IRC (Quit: Konversation terminated!) 2012-01-06T01:30:47 *** amstan has joined #aichallenge 2012-01-06T01:30:47 *** ChanServ sets mode: +o amstan 2012-01-06T01:36:08 *** amstan has quit IRC (Ping timeout: 240 seconds) 2012-01-06T01:38:39 *** amstan has joined #aichallenge 2012-01-06T01:38:39 *** ChanServ sets mode: +o amstan 2012-01-06T01:38:41 *** sigh has joined #aichallenge 2012-01-06T01:42:21 *** kapoc has left #aichallenge 2012-01-06T01:55:34 *** grc48 has joined #aichallenge 2012-01-06T01:55:49 *** alehorst has quit IRC (Ping timeout: 240 seconds) 2012-01-06T01:57:06 *** JorgeB has quit IRC (Quit: Computer has gone to sleep.) 2012-01-06T02:06:10 *** Kurnevsky has joined #aichallenge 2012-01-06T02:23:33 *** cyphase has quit IRC (Ping timeout: 248 seconds) 2012-01-06T02:26:22 *** UncleVasya has joined #aichallenge 2012-01-06T02:36:21 *** cyphase has joined #aichallenge 2012-01-06T02:45:05 *** Accoun has quit IRC () 2012-01-06T02:52:18 *** kire has joined #aichallenge 2012-01-06T03:08:22 *** u_ has quit IRC (Quit: u_) 2012-01-06T03:08:47 *** thestinger has quit IRC (Quit: WeeChat 0.3.6) 2012-01-06T03:11:24 *** Palmik has joined #aichallenge 2012-01-06T03:27:20 *** kire has quit IRC (Quit: Leaving) 2012-01-06T03:28:41 *** dorisabayon has joined #aichallenge 2012-01-06T03:32:11 *** Fandekasp has quit IRC (Ping timeout: 252 seconds) 2012-01-06T03:35:42 *** janzert has quit IRC (Read error: Connection reset by peer) 2012-01-06T03:36:25 *** janzert has joined #aichallenge 2012-01-06T03:46:29 *** Accoun has joined #aichallenge 2012-01-06T03:50:46 *** treeform has quit IRC (Remote host closed the connection) 2012-01-06T03:58:50 *** UncleVasya has quit IRC (Read error: Connection reset by peer) 2012-01-06T04:14:04 *** grc48 has quit IRC (Quit: This computer has gone to sleep) 2012-01-06T04:17:51 *** epicmonkey has joined #aichallenge 2012-01-06T04:25:31 *** alehorst has joined #aichallenge 2012-01-06T04:32:31 *** mviel__ has joined #aichallenge 2012-01-06T04:35:31 *** alehorst has quit IRC (Quit: Leaving.) 2012-01-06T04:35:38 *** mviel_ has quit IRC (Ping timeout: 240 seconds) 2012-01-06T04:47:02 *** Garf has quit IRC (Read error: Connection reset by peer) 2012-01-06T04:48:20 *** Garf has joined #aichallenge 2012-01-06T04:55:05 *** replore_ has quit IRC (Remote host closed the connection) 2012-01-06T05:16:30 *** mviel__ is now known as mviel 2012-01-06T05:18:41 *** TL_ has joined #aichallenge 2012-01-06T05:27:12 *** TL_ has quit IRC (Quit: Page closed) 2012-01-06T05:55:23 *** amstan has quit IRC (Quit: Konversation terminated!) 2012-01-06T06:09:59 *** dorisabayon has quit IRC (Ping timeout: 255 seconds) 2012-01-06T06:21:04 *** Garf has quit IRC (Ping timeout: 240 seconds) 2012-01-06T06:21:14 *** Garf has joined #aichallenge 2012-01-06T06:30:51 *** mcstar has joined #aichallenge 2012-01-06T06:50:27 *** pairofdice has quit IRC (Quit: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.) 2012-01-06T06:52:45 *** ericlavigne has joined #aichallenge 2012-01-06T06:56:41 *** lhb__ is now known as raemde 2012-01-06T07:48:41 *** Jak_o_Shadows has quit IRC (Read error: Connection reset by peer) 2012-01-06T07:49:52 *** Blkt has joined #aichallenge 2012-01-06T07:53:55 *** Fandekasp has joined #aichallenge 2012-01-06T07:53:57 good day everyone 2012-01-06T08:03:11 *** ericlavigne has quit IRC (Quit: Page closed) 2012-01-06T08:09:51 *** foRei has joined #aichallenge 2012-01-06T08:12:11 *** ahow984_ has joined #aichallenge 2012-01-06T08:12:38 *** Palmik has quit IRC (Ping timeout: 252 seconds) 2012-01-06T08:19:53 *** replore_ has joined #aichallenge 2012-01-06T08:20:35 *** Palmik has joined #aichallenge 2012-01-06T08:24:11 *** sigh has quit IRC (Remote host closed the connection) 2012-01-06T08:25:00 *** sigh has joined #aichallenge 2012-01-06T08:44:59 ahow984_: have you solved #17? 2012-01-06T08:47:13 *** replore_ has quit IRC (Ping timeout: 244 seconds) 2012-01-06T08:48:21 mcstar: yes 2012-01-06T08:48:48 5 lines for mne 2012-01-06T08:48:53 you? 2012-01-06T08:48:56 damn lisp 2012-01-06T08:48:59 lots and lots of lines 2012-01-06T08:49:29 :) 35 mins into the challenge and a third of the way through 2012-01-06T08:57:39 oops, 4 lines 2012-01-06T08:57:47 what chalenge? 2012-01-06T08:57:55 USACO 2012-01-06T08:58:04 http://www.usaco.org/index.php 2012-01-06T08:58:41 i thought you had to do it in a controlled environment 2012-01-06T08:59:50 i mean under supervision 2012-01-06T09:00:02 in a classroom 2012-01-06T09:00:10 no 2012-01-06T09:00:14 not for these ones 2012-01-06T09:00:24 theres not much point cheating on it like :P 2012-01-06T09:01:09 ok 2012-01-06T09:01:15 well, dont let me disturb you 2012-01-06T09:03:18 *** Kurnevsky has left #aichallenge 2012-01-06T09:05:21 heh, I won't. I think I have problem 2 done now :) 2012-01-06T09:05:26 still like 3 hours to go lol 2012-01-06T09:05:37 although I am in the lowest division :P 2012-01-06T09:06:33 *** mviel_ has joined #aichallenge 2012-01-06T09:08:32 shit, the last one is a pathfinding one :P 2012-01-06T09:09:40 you gonna nail it easy 2012-01-06T09:09:51 *** UncleVasya has joined #aichallenge 2012-01-06T09:10:20 heh, I think so :) I may have found a way to do it easily enough although my pathfinding skills are awful :P 2012-01-06T09:10:36 *** mviel has quit IRC (Ping timeout: 268 seconds) 2012-01-06T09:14:19 amstan deleted his asteroids project. mcstar, you have these source, right? We can keep them and after 30-40 years will solve them to those who will write a history of aichallenge. 2012-01-06T09:14:31 *will sell 2012-01-06T09:14:43 *will sail 2012-01-06T09:14:45 damn 2012-01-06T09:15:05 did he? 2012-01-06T09:15:10 why? 2012-01-06T09:15:11 will exchange for money :) 2012-01-06T09:15:53 yep, I tried to update my local repo of his code and found the fact there are no more Asteroids on github. 2012-01-06T09:16:10 Now I'm going to look at the aeriques one. 2012-01-06T09:16:30 I hope they will not dissapear in few days. 2012-01-06T09:16:54 I dont't knwo why. Maybe because aerique has more progress. 2012-01-06T09:17:02 *know 2012-01-06T09:18:16 check out aerique's repo 2012-01-06T09:26:24 lol mcstar I won't be able to do this one :P :/ it's not too much like pathfinding after all, you need to find the number of different paths they can take :P 2012-01-06T09:27:57 number of different paths is a DP-problem, right? 2012-01-06T09:28:17 I don't know what a DP-Problem is, but don't tell me 2012-01-06T09:28:19 or combinatorial 2012-01-06T09:28:20 Saw it in the book yesterday. 2012-01-06T09:28:23 Don't give me any hints 2012-01-06T09:28:32 actually :P 2012-01-06T09:28:43 dont worry, dp doesnt mean anything 2012-01-06T09:28:51 except deep penetration 2012-01-06T09:29:01 or double 2012-01-06T09:29:10 yes 2012-01-06T09:35:03 *** dorisabayon has joined #aichallenge 2012-01-06T09:37:53 *** choas has joined #aichallenge 2012-01-06T09:38:21 *** Fandekasp has quit IRC (Ping timeout: 252 seconds) 2012-01-06T09:45:35 *** epicmonkey has quit IRC (Read error: Operation timed out) 2012-01-06T09:48:38 *** sigh has joined #aichallenge 2012-01-06T10:04:57 *** Kurnevsky has joined #aichallenge 2012-01-06T10:28:59 scoping with recursion >_< 2012-01-06T10:30:09 ahow984_: before you understand recursion you must understand recursion 2012-01-06T10:31:42 taking a food break now :) 2012-01-06T10:32:04 another hour and 45 mins left :) 2012-01-06T10:32:43 surely I can find a workaround to it in that length of time.... 2012-01-06T10:45:10 UncleVasya: recursion = let p1 = "before you understand "; p2 = "you must understand " in p1 ++ recursion ++ p2 ++ recursion 2012-01-06T10:45:57 damn 2012-01-06T10:46:29 it sucks before it is doubly recursive 2012-01-06T10:46:59 Are you wanna explode my head? 2012-01-06T10:47:05 before->because 2012-01-06T10:47:23 PE is down again 2012-01-06T10:47:27 *** sigh has quit IRC (Remote host closed the connection) 2012-01-06T10:47:29 i cant check #22 2012-01-06T10:48:55 UncleVasya: do you want to make my head explode? 2012-01-06T10:50:06 oh joy of joys 2012-01-06T10:50:10 seg fault -_- 2012-01-06T10:50:23 segg=ass 2012-01-06T10:51:02 ahow984_: what did you do to PE again? 2012-01-06T10:51:06 ty 2012-01-06T10:51:13 you cant enter 100 problems per second 2012-01-06T10:51:26 or else you bring down the server 2012-01-06T10:51:32 lolwut? :P 2012-01-06T10:51:42 just because I can solve them that fast ;) 2012-01-06T10:51:45 (solutions, not problems) 2012-01-06T10:51:46 don't be jealous 2012-01-06T10:51:50 i am! 2012-01-06T10:51:55 heh 2012-01-06T10:55:20 :O 2012-01-06T10:55:29 gdb actually worked lol 2012-01-06T10:55:55 I have some bad experiences with that thing 2012-01-06T11:00:16 what is gdb? 2012-01-06T11:00:53 gnu debugger 2012-01-06T11:01:03 when it works, it's very useful 2012-01-06T11:01:15 but for me, it's usually a bitch... 2012-01-06T11:01:32 can give you info about segfaults and other runtime errors 2012-01-06T11:01:46 especially with C++ and compiling with -g :) 2012-01-06T11:05:48 *** denysonique_ has quit IRC (Remote host closed the connection) 2012-01-06T11:06:29 ahow984_: it always works! 2012-01-06T11:07:47 rwest: yeah, probably does if you know what you're doing 2012-01-06T11:08:15 :( I know when I show someone here the problem in about an hours time that you're going to have a freaking 1 liner to do it 2012-01-06T11:08:27 grrr, /me hates logic errors 2012-01-06T11:10:09 *** u_ has joined #aichallenge 2012-01-06T11:10:38 ahow984_: did you solve your path counting problem? 2012-01-06T11:10:54 the PE one or this one? 2012-01-06T11:11:05 for your current contest thing 2012-01-06T11:11:19 i didn't know there's a pe one? 2012-01-06T11:11:27 not this one 2012-01-06T11:11:40 the PE one is the number of ways through a 20*20 maze 2012-01-06T11:12:21 the lattice? 2012-01-06T11:12:29 I've got a logic error but I think I found it :) 2012-01-06T11:12:38 mcstar: yeah, I suppose it is a lattice 2012-01-06T11:13:00 ive got a fully "functional" solution to that 2012-01-06T11:13:14 *** dapplegate has joined #aichallenge 2012-01-06T11:13:14 mcstar: mine took 1 hour to run 2012-01-06T11:13:20 rwest: haha 2012-01-06T11:13:23 rwest?? 2012-01-06T11:13:26 kidding? 2012-01-06T11:13:34 mine would have too but I learnt the proper way to do it :) 2012-01-06T11:13:43 with binomial coefficents and stuff :P 2012-01-06T11:13:48 rwest: its the same kind of problem that the last step requires in your interview problem 2012-01-06T11:13:59 I know 2012-01-06T11:14:54 that is a difficult step to do in tcl 2012-01-06T11:15:46 *** denysonique_ has joined #aichallenge 2012-01-06T11:16:32 rwest: it was really easy once you found out the math way :P 2012-01-06T11:16:45 just 20*2 C 20 2012-01-06T11:17:30 hah 2012-01-06T11:17:40 I knew there was a way to do it like that 2012-01-06T11:18:29 so what is the next problem to work on? 2012-01-06T11:18:51 I have 2 easy enough ones here if you want to see them? 2012-01-06T11:19:03 what numbers? 2012-01-06T11:19:10 not PE ;) 2012-01-06T11:19:20 different type altogether 2012-01-06T11:19:21 nah, I need a pat on the back from a web site 2012-01-06T11:19:22 lol 2012-01-06T11:19:29 heh, I'm the same way :P 2012-01-06T11:19:35 I am 1 away from level up 2012-01-06T11:19:57 I am gonna do 22 2012-01-06T11:20:13 does it count as cheating if i do it with wolfram alpha? 2012-01-06T11:20:33 antimatroid: I say no, I did a couple that way hah 2012-01-06T11:20:34 meh, theres no real cheating on the site I don't think 2012-01-06T11:20:43 i did 48 with that just then ehe 2012-01-06T11:20:47 but I wouldn't do it because the idea is that you learn from it :P 2012-01-06T11:20:59 yeah, you can cheat with friends/websites 2012-01-06T11:21:05 but you're only really cheating yourself 2012-01-06T11:21:55 grr 2012-01-06T11:22:04 this code should run perfectly 2012-01-06T11:23:36 *** sofuture has quit IRC (Remote host closed the connection) 2012-01-06T11:23:52 *** denysonique_ has quit IRC (Remote host closed the connection) 2012-01-06T11:23:52 *** mattswe has quit IRC (Remote host closed the connection) 2012-01-06T11:24:18 *** nickjohnson has quit IRC (Remote host closed the connection) 2012-01-06T11:27:10 *** sofuture has joined #aichallenge 2012-01-06T11:30:50 *** denysonique_ has joined #aichallenge 2012-01-06T11:31:49 *** nickjohnson has joined #aichallenge 2012-01-06T11:31:50 *** mattswe has joined #aichallenge 2012-01-06T11:32:52 level 1! 2012-01-06T11:33:04 wow, that was fast 2012-01-06T11:33:22 php is great for reading csv files and sorting 2012-01-06T11:33:41 $names = fgetcsv($file); sort($names); 2012-01-06T11:33:43 lol 2012-01-06T11:33:53 >_< 2012-01-06T11:33:55 lol 2012-01-06T11:34:18 *** UncleVasya has quit IRC () 2012-01-06T11:34:48 int get_answer(int moves, int x, int y, vector > places) { 2012-01-06T11:34:48 vector > local_places = places; 2012-01-06T11:35:19 yet, somehow, with a debug print before and after 2012-01-06T11:35:28 local_places != places.... 2012-01-06T11:35:48 rwest: check out mine in the forum 2012-01-06T11:35:57 mcstar: ? 2012-01-06T11:35:59 i couldnt get it under 5 lines 2012-01-06T11:36:03 solution to 22 2012-01-06T11:36:27 that 3 liner in python is impressive before mine 2012-01-06T11:36:41 I see 2012-01-06T11:37:20 echo `cat names.txt | sed 's#,#\n#g' | sed 's#"##g' | sort | sed 's/./\0 /g' | awk '{ s = 0; for (i = 1; i <= NF; i++) s += index("ABCDEFGHIJKLMNOPQRSTUVWXYZ", $i); print s * NR }'` | sed 's/ /+/g' | bc 2012-01-06T11:37:24 best one 2012-01-06T11:37:27 lol 2012-01-06T11:38:03 deserves some applause 2012-01-06T11:38:30 hm 2012-01-06T11:38:33 mcstar: you got a minute? 2012-01-06T11:38:33 surprisingly fast 2012-01-06T11:38:42 yeah 2012-01-06T11:38:47 I've given up on this problem and want to see how you'd do it :P 2012-01-06T11:39:11 you've a field 5*5 2012-01-06T11:39:18 mcstar: what is your PE friend key? 2012-01-06T11:39:32 there are 2 cows, at 0,0 and 5,5 (one at each) 2012-01-06T11:40:12 you have to find out how many ways they can eat all the grass in the field and end up finishing at the same location 2012-01-06T11:40:36 but the problem is some areas are barren, so they can't stand at them locations 2012-01-06T11:41:18 given the number of barren patches (and their locations), how many ways can they reach the same patch having eaten all other bits of grass? 2012-01-06T11:41:34 ahow984_: should just be a graph 2012-01-06T11:41:55 huh? 2012-01-06T11:42:03 5x5 but you have index 5? 2012-01-06T11:42:12 from 0-5 thats 6x6 2012-01-06T11:42:12 http://codepad.org/bQrco9Uf 2012-01-06T11:42:15 is my attempt 2012-01-06T11:42:24 sorry, 0,0 and 4,4 2012-01-06T11:43:00 ahow984_: do they both have to move the same amount of times? 2012-01-06T11:43:03 complete with a dodgy function that posesses some recursive qualities :P 2012-01-06T11:43:06 rwest: yes 2012-01-06T11:43:21 and once a patch has been stood on, they can't move there again 2012-01-06T11:43:27 so barren areas are totally excluded 2012-01-06T11:43:31 yes 2012-01-06T11:43:51 ahow984_: there is a recursive solution that is simple 2012-01-06T11:43:58 haha 2012-01-06T11:44:01 knew it :P 2012-01-06T11:44:04 be kinda a slow 2012-01-06T11:44:06 though 2012-01-06T11:44:12 yeah 2012-01-06T11:44:15 though the search space is small enough 2012-01-06T11:44:18 I just ignored the < 1s runtime 2012-01-06T11:44:23 but explain? 2012-01-06T11:44:43 basically just an exhaustive search 2012-01-06T11:45:01 like what I tried to do? 2012-01-06T11:45:02 you try every move with each cow and add 1 if they end on the same tile at the end 2012-01-06T11:45:07 lemme look at yours 2012-01-06T11:45:21 codepad link ^^ 2012-01-06T11:46:13 can they step back to a visited patch? 2012-01-06T11:46:19 mcstar: no 2012-01-06T11:46:23 no 2012-01-06T11:46:47 ahow984_: http://en.wikipedia.org/wiki/Divide_and_conquer_algorithm 2012-01-06T11:46:58 I don't see whats wrong with my code :/ 2012-01-06T11:47:15 this problem is too hard for me 2012-01-06T11:47:54 basically you need to push moves onto a stack and check them for validity, return 0 if not valid else, do next move 2012-01-06T11:47:55 huh, I don't feel too bad so 2012-01-06T11:48:09 if they end up on the same space at the end with no more valid moves, return 1 2012-01-06T11:48:23 rwest: I don't see the huge difference between that and my code? 2012-01-06T11:48:55 ahow984_: It probably is the same, but it's harder to follow iteratively 2012-01-06T11:49:05 kk 2012-01-06T11:49:27 :/ it should work, thats what really annoys me :( 2012-01-06T11:49:50 you could remove the for loop with the switch 2012-01-06T11:49:55 and just leave the if statements 2012-01-06T11:50:10 since you are running them all anyway 2012-01-06T11:50:45 yeah 2012-01-06T11:50:55 so I'll remove the for and the switch 2012-01-06T11:51:55 you never return answer? 2012-01-06T11:52:05 nvm global 2012-01-06T11:52:33 you are almost doing recursion heh 2012-01-06T11:52:36 I just noticed 2012-01-06T11:52:42 heh 2012-01-06T11:52:44 yeah :P 2012-01-06T11:53:07 it works recursively, but isn't actually recursion :P 2012-01-06T11:53:35 and taking out that switch and them made runtime about 6 times shorter :P 2012-01-06T11:54:15 you should check validity of the move at the begining of the function 2012-01-06T11:54:39 and return get_answer(move) + get_answer(othermove) + ... 2012-01-06T11:54:44 to make it real recursion 2012-01-06T11:54:48 it's easier to read that way 2012-01-06T11:54:55 hmm 2012-01-06T11:55:00 kk, I'll try 2012-01-06T11:55:56 brb grabbing lunch 2012-01-06T11:57:55 kk 2012-01-06T11:59:39 can they walk diagonally? 2012-01-06T12:00:50 no 2012-01-06T12:01:01 heh, code reduced by 35 lines :) 2012-01-06T12:01:04 http://codepad.org/x3u1gPQ0 2012-01-06T12:02:09 mcstar: any ideas why it's not working? 2012-01-06T12:02:30 i dont know 2012-01-06T12:02:34 i dont want to look at it 2012-01-06T12:02:44 haha, kk 2012-01-06T12:03:30 got problem 50 2012-01-06T12:03:45 took 19s though :P 2012-01-06T12:06:18 *** treeform has joined #aichallenge 2012-01-06T12:06:57 this is already pretty fast, but for the sake of learning do you guys do anything differently for primes? http://pastebin.com/vcwArV3L 2012-01-06T12:07:57 back 2012-01-06T12:09:06 ahow984_: I know the problem 2012-01-06T12:09:15 the moves are not always mirrored 2012-01-06T12:14:16 and unfortunately that makes for 16 calls per recursion 2012-01-06T12:15:28 same 2012-01-06T12:15:31 I just did there 2012-01-06T12:15:33 :@ 2012-01-06T12:15:40 no 2012-01-06T12:15:46 thats not the problem 2012-01-06T12:16:24 it doesn't take into account the already barren squares when it checks for mirror symetry >_< 2012-01-06T12:16:46 rwest: the moves aren't mirrored, but the area they cover is ;) 2012-01-06T12:17:17 ach :( 2012-01-06T12:17:19 too late now 2012-01-06T12:17:21 nobody wants to harrass my prime code for me? :( 2012-01-06T12:17:34 antimatroid: I saw it, its not how I do it but it looks faster 2012-01-06T12:17:44 how do you do it? 2012-01-06T12:17:47 I just do a simple sieve or erasthotenes 2012-01-06T12:17:54 that's what i'm doing 2012-01-06T12:17:56 essentially 2012-01-06T12:18:01 *however you spell it 2012-01-06T12:19:03 *** McLeopold has left #aichallenge 2012-01-06T12:19:06 antimatroid: I believe that is the fastest way possible 2012-01-06T12:19:09 *** McLeopold has joined #aichallenge 2012-01-06T12:19:26 possible or known? 2012-01-06T12:19:33 ahow984_: I mean there should be 16 possible moves per turn 2012-01-06T12:19:38 i'd be interested if there was a proof that that's the most efficient 2012-01-06T12:19:42 antimatroid: same thing? 2012-01-06T12:19:44 lol 2012-01-06T12:19:48 nowhere near 2012-01-06T12:20:11 if you can show something is the most efficient there's no need to look any further :P 2012-01-06T12:20:23 ahow984_: because he cow can move 4 ways and there are 2 of them 2012-01-06T12:20:29 so 4^2 moves 2012-01-06T12:20:48 antimatroid: that is a difficult task 2012-01-06T12:20:52 lol 2012-01-06T12:21:01 i have something that runs instantly 2012-01-06T12:21:03 it is, but it's the sort of thing you see in statistic 2012-01-06T12:21:04 s 2012-01-06T12:21:17 ive got to peel the result out from the calculatini though 2012-01-06T12:21:35 antimatroid: what problem you doing btw? 2012-01-06T12:21:41 mcstar: mine's reasonably fast 2012-01-06T12:21:49 rwest: just starting to look at 49 2012-01-06T12:21:51 but being lazy 2012-01-06T12:21:57 antimatroid: not talking about primes 2012-01-06T12:22:00 i did 50 but it was really slow 2012-01-06T12:25:07 rwest: 2012-01-06T12:25:15 do you understand what I'm saying? 2012-01-06T12:25:51 bbiab, dinner 2012-01-06T12:27:53 nice, much better segfault 2012-01-06T12:32:41 that sucks 2012-01-06T12:32:53 i get problem 50 out in 0.148s if i don't do it "correctly" 2012-01-06T12:33:05 it gets the correct answer, but it's not really checking it properly 2012-01-06T12:33:22 from the forum you can tell most people didn't do it properly 2012-01-06T12:35:06 *** Fandekasp has joined #aichallenge 2012-01-06T12:35:59 derp 2012-01-06T12:36:08 i'm retarded 2012-01-06T12:36:54 i guess i see the trick now then :P 2012-01-06T12:37:21 wait no i don't :\ 2012-01-06T12:37:31 * antimatroid stops talking to himself 2012-01-06T12:37:48 thestinger: you about? 2012-01-06T12:38:01 *** treeform has quit IRC (Remote host closed the connection) 2012-01-06T12:38:13 not even in the room :p 2012-01-06T12:38:41 *** dorisabayon has quit IRC (Ping timeout: 252 seconds) 2012-01-06T12:38:44 *** mviel_ has quit IRC (Quit: Leaving) 2012-01-06T12:38:53 *** thestinger has joined #aichallenge 2012-01-06T12:39:06 thestinger: perfect timing, how did you do 50? 2012-01-06T12:39:23 sec 2012-01-06T12:39:30 did you check for sums of consecutive primes starting anywhere or just from 2? 2012-01-06T12:39:47 it takes me less that 200ms to do the later, almost 20s to do the former 2012-01-06T12:39:59 both give the correct answer, but imo the former is the correct way to do it 2012-01-06T12:40:02 hm 2012-01-06T12:40:23 lol, I used Go for this 2012-01-06T12:40:27 crappy language 2012-01-06T12:40:34 ahow984_: whats the result if there are no "barren" areas? 2012-01-06T12:40:45 ahow984_: I do, but you are still missing a lot of possible moves 2012-01-06T12:41:06 antimatroid: I got all primes below 1000000 and then found the highest consecutive ones or whatever 2012-01-06T12:41:14 problem 17 is being annoying 2012-01-06T12:41:21 oh shit I see it 2012-01-06T12:41:37 thestinger: but highest how? starting from 2+.... ? or prime + ....? 2012-01-06T12:41:49 if you just check from 2 + ... you get the right answer 2012-01-06T12:42:10 oh 2012-01-06T12:42:12 well 2012-01-06T12:42:15 rwest: do you have a solution to ahow984_ 's proposal? 2012-01-06T12:42:20 I find the longest consecutive chain of them, anywhere 2012-01-06T12:42:22 i "think" mine is working 2012-01-06T12:42:31 but i cant check it 2012-01-06T12:42:43 yeah, that's what i did but slowly 2012-01-06T12:43:00 mine takes 120ms 2012-01-06T12:43:19 but i think you get the right answer anyway, at least it did when I cut it short when the sum of primes starting at 2 is above 1000000 2012-01-06T12:43:21 I don't really understand my code, lemme figure it out 2012-01-06T12:43:22 lol 2012-01-06T12:43:28 although it may have still done it somewhat differently i guess 2012-01-06T12:43:39 i'm going to get some more sleep i think 2012-01-06T12:44:05 ah okay 2012-01-06T12:44:07 I used a slice 2012-01-06T12:44:18 that makes sense 2012-01-06T12:44:22 and I basically just did takeWhile and took a sum 2012-01-06T12:44:26 if I read this correctly 2012-01-06T12:44:41 I precalculated all the primes 2012-01-06T12:45:05 mcstar: which proposal? 2012-01-06T12:45:07 anyway, Go sucks 2012-01-06T12:45:44 Go lost me with requiring { not be on a newline 2012-01-06T12:45:54 rwest: the cowa 2012-01-06T12:45:55 cows 2012-01-06T12:45:59 antimatroid: lol, that's not why it sucks 2012-01-06T12:46:09 it was enough to turn me off 2012-01-06T12:46:10 mcstar: I know how to do it, I just haven't done it myself 2012-01-06T12:46:10 *** theskumar has joined #aichallenge 2012-01-06T12:46:22 thats not what i asked 2012-01-06T12:46:24 i'm very anal about something being aesthetically pleasing tome 2012-01-06T12:46:26 i just want tnumbers 2012-01-06T12:46:34 antimatroid: using {} is ugly anyway :P 2012-01-06T12:46:43 whats the correct answer for no barren ares? 2012-01-06T12:46:44 it's nice when functions get large 2012-01-06T12:46:46 areas 2012-01-06T12:46:52 antimatroid: why? 2012-01-06T12:47:01 seeing where indentation ends 2012-01-06T12:47:11 mcstar: you mean the number of paths? 2012-01-06T12:47:16 yes 2012-01-06T12:47:29 I dunno, i would have to do the problem, I am guessing it's a large number 2012-01-06T12:47:36 i just find it easier and nicer with the brackets, creature of habit perhaps :P 2012-01-06T12:47:38 i get ~3000 2012-01-06T12:47:41 antimatroid: well, when you've been coding in a language like haskell/python that let you use indentation for blocks, you get used to it 2012-01-06T12:47:41 i get ~30000 2012-01-06T12:47:55 I've done a lot in languages with {} and with indentation, and indentation is better :P 2012-01-06T12:48:03 that's something I would think would be correct 2012-01-06T12:48:27 as long as you have the cows moving independent of eachother 2012-01-06T12:48:38 rwest: is it required that the cows' last step is to the same tile? 2012-01-06T12:48:43 yes 2012-01-06T12:48:49 they are independent 2012-01-06T12:48:59 but i dont check for the prev. condition 2012-01-06T12:53:41 http://projecteuler.net/problem=32 doing this one next 2012-01-06T12:53:44 I skipped it 2012-01-06T12:53:56 well, I skipped random ones 2012-01-06T12:54:00 because I haven't done them in order 2012-01-06T12:54:52 ahow984_: still dining? 2012-01-06T12:54:59 dont each so much 2012-01-06T12:55:12 and dont talk to your parents, takes too much time 2012-01-06T12:55:26 each->eat 2012-01-06T12:55:31 weird typo 2012-01-06T12:56:06 rwest: that requirement decimated the result 2012-01-06T12:59:05 *** JorgeB has joined #aichallenge 2012-01-06T12:59:23 *** X-Scale has quit IRC (Ping timeout: 268 seconds) 2012-01-06T13:01:35 *** X-Scale has joined #aichallenge 2012-01-06T13:01:45 mcstar: yes, because that means there should only be 23 possible end positions 2012-01-06T13:02:00 *** X-Scale is now known as Guest52775 2012-01-06T13:02:03 anybody do PE 17? 2012-01-06T13:02:19 yep 2012-01-06T13:02:22 yes 2012-01-06T13:02:24 just recently 2012-01-06T13:02:30 20382 2012-01-06T13:02:31 how close? 2012-01-06T13:02:32 stupid problem 2012-01-06T13:02:41 I can't be off by much 2012-01-06T13:02:43 very 2012-01-06T13:02:51 mcstar: lol, one of the stupidest ones was just datetime crap 2012-01-06T13:02:54 I forget which 2012-01-06T13:03:05 thestinger: i didnt do it 2012-01-06T13:03:08 grep says 19 2012-01-06T13:03:13 i asked ahow for solution 2012-01-06T13:03:26 I'll show you mine, I just used python's datetime module 2012-01-06T13:03:28 lol 2012-01-06T13:03:39 http://sprunge.us/EYEN 2012-01-06T13:03:48 i mean, he pasted the code, i just didnt want to run it 2012-01-06T13:03:58 oh 2012-01-06T13:03:59 haha 2012-01-06T13:04:03 nice 2012-01-06T13:04:20 in c++ that was like 50 lines 2012-01-06T13:04:56 thestinger: tuple comprehension? 2012-01-06T13:05:07 well, list comprehensions are generalized in python 2012-01-06T13:05:11 to generator expressions 2012-01-06T13:05:15 they are lazily calculated 2012-01-06T13:05:21 that's just a generator comprehension 2012-01-06T13:05:23 ah, () is a generator 2012-01-06T13:05:26 ok 2012-01-06T13:05:28 well 2012-01-06T13:05:31 i read about it long ago 2012-01-06T13:05:35 don't need the () 2012-01-06T13:05:51 x*2 for x in range(10) if x % 2 2012-01-06T13:05:56 with [ ] around it, it makes a list 2012-01-06T13:06:02 originally, that was the only way you could do it 2012-01-06T13:06:06 but now it's generalized 2012-01-06T13:06:08 so 2012-01-06T13:06:12 {x for x in range(10)} 2012-01-06T13:06:15 set comprehension 2012-01-06T13:06:43 can do a dictionary comprehension, etc. too 2012-01-06T13:06:49 to these things scale well for large data? 2012-01-06T13:06:54 yeah 2012-01-06T13:07:01 a generator expression or function is lazy 2012-01-06T13:07:15 i mean the others 2012-01-06T13:07:16 comprehensions are the non-lazy version 2012-01-06T13:07:19 well, they scale well 2012-01-06T13:07:23 [] and {} 2012-01-06T13:07:30 yeah, much faster than a python for loop 2012-01-06T13:07:42 also you can do a dictionary comprehension, etc. 2012-01-06T13:08:01 for a tuple you have to use the generator version and wrap it in tuple() 2012-01-06T13:08:06 tuple(x for x in range(10)) 2012-01-06T13:08:24 anyway you could also do a list, set, dict, etc. like that 2012-01-06T13:08:31 probably no real speed difference in pypy 2012-01-06T13:08:49 mcstar: lol I didnt add in the numbers 21-99 because I removed a line on accident 2012-01-06T13:09:02 mcstar: range() is a generator in python3, so it's lazy 2012-01-06T13:09:18 you can just make a generator function with yield, or make a generator expression 2012-01-06T13:09:21 thestinger: i was just missing xrange today! so thats the answer 2012-01-06T13:11:36 mcstar: anyway, the idiom is to usually make your functions that return a sequence of things into generators 2012-01-06T13:11:40 so you get laziness 2012-01-06T13:11:46 the overhead isn't really very much 2012-01-06T13:12:23 it still, isnt like haskell's lazyness 2012-01-06T13:12:26 yeah 2012-01-06T13:12:29 but thats probably a good thing 2012-01-06T13:14:40 for 59 I basically made a string comprehension :P 2012-01-06T13:14:43 for part of it 2012-01-06T13:14:53 "".join(chr(char ^ key) for char, key in zip(encoded, cycle(key))) 2012-01-06T13:15:24 itertools and functools have some nice stuff that's in Prelude in haskell 2012-01-06T13:15:40 zip is a built-in though 2012-01-06T13:17:41 would you mind only pasting solution to problems that i sovled? 2012-01-06T13:17:57 well, that's not really a solution :P 2012-01-06T13:19:11 I should look at your progress list though 2012-01-06T13:19:52 thestinger: what is your friend id? 2012-01-06T13:20:07 10672519203764_e5bfce42a35074ded32df3ce5a56999f 2012-01-06T13:25:43 *** denysonique_ has quit IRC (Write error: Broken pipe) 2012-01-06T13:25:49 *** sofuture has quit IRC (Remote host closed the connection) 2012-01-06T13:25:49 *** mattswe has quit IRC (Remote host closed the connection) 2012-01-06T13:26:19 *** sofuture has joined #aichallenge 2012-01-06T13:29:21 *** treeform has joined #aichallenge 2012-01-06T13:29:23 back now 2012-01-06T13:29:27 mcstar: 2012-01-06T13:30:07 yay, done 32 2012-01-06T13:30:09 on to 33 :) 2012-01-06T13:30:22 I don't know the result if there are no barren areas 2012-01-06T13:30:25 some of these are easy to just brute force 2012-01-06T13:30:29 oh, my code will work with that 2012-01-06T13:30:29 sec 2012-01-06T13:30:56 ahow984_: how do you check for correctness? 2012-01-06T13:31:11 *** treeform has quit IRC (Remote host closed the connection) 2012-01-06T13:31:36 *** treeform has joined #aichallenge 2012-01-06T13:31:37 oh, guys 2012-01-06T13:31:42 do 79 2012-01-06T13:32:11 you can do it with *nix command-line utilities in a line 2012-01-06T13:32:12 mcstar: there must be more problems then I though 2012-01-06T13:32:13 *thought 2012-01-06T13:32:21 that fails too 2012-01-06T13:33:03 ahow984_: you are not trying all possibilities 2012-01-06T13:33:07 well, easier just to do it in python/haskell anyway 2012-01-06T13:33:34 rwest: oh? yes, I see now 2012-01-06T13:33:50 i doiim heavily 2012-01-06T13:33:52 you could also do 79 on paper in 5 minutes 2012-01-06T13:33:57 there might be multiple ways one cow can get to the goal instead of just one >_< 2012-01-06T13:34:03 damn 2012-01-06T13:34:36 thats niot what i said 2012-01-06T13:34:37 im doing a brute force one 2012-01-06T13:34:39 and aim swapping heavily 2012-01-06T13:34:41 time slowed down 2012-01-06T13:35:08 *** mattswe has joined #aichallenge 2012-01-06T13:35:44 *** theskumar has quit IRC (Ping timeout: 258 seconds) 2012-01-06T13:35:46 hah im back 2012-01-06T13:35:59 the system could handle the strain 2012-01-06T13:36:59 lol I did 79 in a text file 2012-01-06T13:37:09 took 3 minutes 2012-01-06T13:37:19 to just compare the strings 2012-01-06T13:37:23 err codes 2012-01-06T13:39:14 oh well, 78 looks pretty easy 2012-01-06T13:39:19 just a bit of recursion 2012-01-06T13:40:15 78 is a math problem lol 2012-01-06T13:40:34 lots can be solved with math 2012-01-06T13:40:35 nvm 2012-01-06T13:40:38 read it 2012-01-06T13:40:43 I dunno how to solve this with math :P 2012-01-06T13:40:51 it's math but you need to compare 2012-01-06T13:41:28 thestinger: I know it's solvable via math, I just don't know how haha 2012-01-06T13:43:23 damn, I was all excited because I thought I solved 78 :P 2012-01-06T13:43:43 maybe I can do these with the little math I know :P 2012-01-06T13:44:48 *** pairofdice has joined #aichallenge 2012-01-06T13:45:06 hm 2012-01-06T13:45:16 can the digits repeat in the passcode? 2012-01-06T13:45:40 no 2012-01-06T13:46:04 oh 2012-01-06T13:46:07 thats stupid then 2012-01-06T13:46:15 I got it by looking at it 2012-01-06T13:46:18 yeah 2012-01-06T13:46:27 there are only 33 different trials 2012-01-06T13:46:40 *** JorgeB_ has joined #aichallenge 2012-01-06T13:46:46 *** Kurnevsky1 has joined #aichallenge 2012-01-06T13:48:07 *** Kurnevsky has quit IRC (Read error: Connection reset by peer) 2012-01-06T13:48:17 mcstar: you only need to use like 7 of them 2012-01-06T13:50:04 *** JorgeB has quit IRC (Ping timeout: 240 seconds) 2012-01-06T13:50:04 *** JorgeB_ is now known as JorgeB 2012-01-06T13:51:12 opps 2012-01-06T13:51:17 unfortunately i got it 2012-01-06T13:51:28 i hacked the system 2012-01-06T13:51:34 im gonna be arrested now 2012-01-06T13:52:50 *** Guest52775 is now known as X-Scale 2012-01-06T13:55:38 D: 2012-01-06T13:59:16 didn't get 78, but I found out some (probably common knowledge) things :) 2012-01-06T13:59:56 ahow984_: so, i want to finish that problem 2012-01-06T14:00:06 can you test my solution? 2012-01-06T14:00:18 or how do you check if yours is rightM? 2012-01-06T14:00:20 sorry :( 2012-01-06T14:00:22 deadline 2012-01-06T14:00:24 oh 2012-01-06T14:00:29 I've got one test case? 2012-01-06T14:01:10 4 3 2 3 3 3 4 3 1 2012-01-06T14:01:19 sorry, 4 2012-01-06T14:01:21 3 2 2012-01-06T14:01:24 3 3 2012-01-06T14:01:25 3 4 2012-01-06T14:01:26 3 1 2012-01-06T14:01:45 output should be 1 2012-01-06T14:02:45 whats that lol? 2012-01-06T14:03:09 bleh, sorry 2012-01-06T14:03:30 they're co-ordinates for the barren areas 2012-01-06T14:03:46 except they need to be translated x-1, y-1 2012-01-06T14:04:15 ok, so there are 4 ares 2012-01-06T14:04:22 4 patches 2012-01-06T14:04:27 yeah 2012-01-06T14:04:31 on line 2 2012-01-06T14:04:37 going from 0-3 2012-01-06T14:06:06 im confused 2012-01-06T14:06:31 the space is 5x5 2012-01-06T14:06:41 are those from 0 to 4? 2012-01-06T14:06:45 the indices 2012-01-06T14:06:49 or 1 to 5 2012-01-06T14:06:52 0-4 2012-01-06T14:06:59 ok 2012-01-06T14:09:22 ahow984_: i get 42 2012-01-06T14:09:31 not kidding 2012-01-06T14:10:04 :/ 2012-01-06T14:10:10 it said the answer was 1 2012-01-06T14:10:20 and when you work it out by hand it gives 1 2012-01-06T14:10:23 *** chris_0076 has quit IRC (Quit: Leaving) 2012-01-06T14:10:29 hm 2012-01-06T14:10:40 ill check 2012-01-06T14:12:05 *** Chris_0076 has joined #aichallenge 2012-01-06T14:13:18 http://pastebin.com/ZRsPVzfF 2012-01-06T14:13:29 someone mind explaining that to me? 2012-01-06T14:13:36 #1111 2012-01-06T14:13:37 something weird I noticed.... 2012-01-06T14:13:40 11111 2012-01-06T14:13:45 2222X 2012-01-06T14:13:49 2#### 2012-01-06T14:13:49 yup 2012-01-06T14:13:53 2222# 2012-01-06T14:14:00 wait.... 2012-01-06T14:14:06 they meet ax X 2012-01-06T14:14:09 at 2012-01-06T14:14:10 yes 2012-01-06T14:14:31 this is what the sample looked like 2012-01-06T14:14:40 01111 2012-01-06T14:14:42 11111 2012-01-06T14:14:47 ****X 2012-01-06T14:14:51 11111 2012-01-06T14:14:59 11110 2012-01-06T14:15:14 where the 2 cows start at the 2 zeroes 2012-01-06T14:15:23 *s are barren from the start 2012-01-06T14:15:35 and X (isn't given) but is the only place they can meet 2012-01-06T14:15:40 thats different 2012-01-06T14:16:04 #1111 2012-01-06T14:16:06 11111 2012-01-06T14:16:08 2#### 2012-01-06T14:16:12 2222# 2012-01-06T14:16:25 damn 2012-01-06T14:16:35 I said translate them x-1, y-1 2012-01-06T14:17:17 *** raemde_ has joined #aichallenge 2012-01-06T14:17:18 ahow984_: http://pastebin.com/jBpDSyEL this is what i did 2012-01-06T14:17:32 that other case is 1 for me too 2012-01-06T14:18:03 yeah, looks like you could only do it one way 2012-01-06T14:18:07 *** Paradoxial has joined #aichallenge 2012-01-06T14:18:08 I'd say you've got it right 2012-01-06T14:18:21 functional? 2012-01-06T14:18:35 c++ 2012-01-06T14:18:41 and no 2012-01-06T14:18:46 still needs checking 2012-01-06T14:19:17 *** Paradoxial has quit IRC (Read error: Connection reset by peer) 2012-01-06T14:19:30 I have it except it didn't take into account the already barren areas 2012-01-06T14:19:48 actually no, I just remember what rwest said :/ 2012-01-06T14:19:49 meh 2012-01-06T14:19:51 :P 2012-01-06T14:20:04 ah i know! 2012-01-06T14:20:07 I have the most terrible solution to 24 2012-01-06T14:20:10 so can someone please explain my pastebin link a few minutes ago? 2012-01-06T14:20:31 I will be really surprised if it finishes under a min 2012-01-06T14:20:38 rwest: I didn't even understand that question :P 2012-01-06T14:21:06 nvm 2012-01-06T14:21:11 I didn't read it right 2012-01-06T14:21:16 *** raemde has quit IRC (Ping timeout: 276 seconds) 2012-01-06T14:21:27 ahow984_: so your pastebin link is doing choosing 2012-01-06T14:21:38 nCr = n!/n!*(n-r)! 2012-01-06T14:21:39 ? 2012-01-06T14:21:41 n choose r 2012-01-06T14:21:41 yeah 2012-01-06T14:22:05 I don't get the -1 crap though haha 2012-01-06T14:22:46 n choose n-1 2012-01-06T14:22:58 should equal to n (at least thats what I think) 2012-01-06T14:23:19 but if you work it out, n choose n-1, the answer is negative.... 2012-01-06T14:23:23 *** Akranis has joined #aichallenge 2012-01-06T14:23:35 no it's nor 2012-01-06T14:23:37 not 2012-01-06T14:24:02 I see what you are doing 2012-01-06T14:24:25 should it be |n!(n-r)!| ? 2012-01-06T14:24:34 you have it backwards 2012-01-06T14:25:06 nCr = n!/(r!(n-r)! 2012-01-06T14:25:08 ) 2012-01-06T14:25:23 >_< 2012-01-06T14:25:25 bleh 2012-01-06T14:25:46 hmm solution still running, brute force no worky 2012-01-06T14:25:48 no, no I don't have it wron.... 2012-01-06T14:25:52 *wrong 2012-01-06T14:25:58 r == n-1 2012-01-06T14:26:08 oh 2012-01-06T14:26:17 -(n-1) becomes n+1 2012-01-06T14:26:28 *hits head of desk* 2012-01-06T14:28:40 is nCr == nC(n-r) 2012-01-06T14:28:46 looks that way.... 2012-01-06T14:31:55 lol wait 2012-01-06T14:32:01 24 is easily doable 2012-01-06T14:32:03 * rwest is dumb 2012-01-06T14:32:14 recursion is faster than my iterative way 2012-01-06T14:32:17 that's a first 2012-01-06T14:32:18 *** epicmonkey has joined #aichallenge 2012-01-06T14:35:18 ahow984_: my error lies in a condition testing, that i cannot do right the way im searching 2012-01-06T14:35:27 i move cowA than cowB 2012-01-06T14:35:39 ill move them simultaneously 2012-01-06T14:36:26 *** choas has quit IRC (Remote host closed the connection) 2012-01-06T14:36:41 *** choas has joined #aichallenge 2012-01-06T14:37:43 mcstar: :( 2012-01-06T14:37:57 It was a difficult problem? 2012-01-06T14:40:13 harder then PE? 2012-01-06T14:40:16 Oh you guys and your problems 2012-01-06T14:40:25 pairofdice: :P 2012-01-06T14:40:31 we need to keep occupied lol 2012-01-06T14:40:45 ahow984_: not really 2012-01-06T14:40:57 more difficult than these starter problems 2012-01-06T14:41:12 but there is surely similarly difficult problems in PE 2012-01-06T14:41:16 are 2012-01-06T14:41:20 *** denysonique_ has joined #aichallenge 2012-01-06T14:41:44 yeah 2012-01-06T14:42:04 that means I should be able to do another 5 or 6 anyways on PE :) 2012-01-06T14:44:26 ahow984_: what's your friend code for euler? 2012-01-06T14:44:30 oh nvm 2012-01-06T14:44:33 you added me 2012-01-06T14:44:55 Oh, there's friends now on PE, cool 2012-01-06T14:45:43 :P 2012-01-06T14:45:50 gotcha thestinger 2012-01-06T14:47:57 its not really "friends" 2012-01-06T14:48:02 http://projecteuler.net/problem=33 what the hell? 2012-01-06T14:48:06 for some reason I don't get this 2012-01-06T14:48:10 more of "You can easily view these peoples' scores" 2012-01-06T14:48:25 anyone want my friend code? :) 2012-01-06T14:48:45 * ahow984_ nods 2012-01-06T14:48:52 1975928851376_9ad6ba0f23a3a47d8eb66fba4c49d54a 2012-01-06T14:48:55 get an idea of #aichallenges average skill level 2012-01-06T14:49:22 and thestinger yes, wtf? 2012-01-06T14:49:23 33 is certainly a bit odd 2012-01-06T14:49:36 :O 2012-01-06T14:49:37 McLeopold: your the highes of us 2012-01-06T14:49:38 hah 2012-01-06T14:49:40 mcstar: wow 2012-01-06T14:49:47 >_< 2012-01-06T14:49:57 McLeopold: wow 2012-01-06T14:50:06 :D 2012-01-06T14:50:16 all python 2012-01-06T14:50:22 #23 fail :-/ 2012-01-06T14:50:26 but I'm not sure if I kept it all at 1 second 2012-01-06T14:50:27 optimizing ftl 2012-01-06T14:50:59 I didn't optimize that one 2012-01-06T14:51:01 http://imgur.com/gallery/Q8kV8 2012-01-06T14:51:03 that btw :P 2012-01-06T14:51:08 rwest: well, how are you factoring? 2012-01-06T14:52:27 thestinger: the worst possible way, but that is not the slow part lol 2012-01-06T14:52:40 anyone working on one above 74? 2012-01-06T14:53:11 thestinger: my problem is determining if the number is the sum of the 2 nums 2012-01-06T14:53:16 I am just trying everything 2012-01-06T14:53:41 thus 6965^2 iterations per number 2012-01-06T14:53:50 I guess I can cut that down easily 2012-01-06T14:54:18 hmm, why? 2012-01-06T14:54:25 still leaves a lot of checks for the high numbers 2012-01-06T14:54:30 sum(factors(n)) > n+n 2012-01-06T14:54:34 mine just compares that 2012-01-06T14:54:36 because there are 6965 abundant numbers 2012-01-06T14:55:01 well, I did this a long time ago 2012-01-06T14:55:14 maybe I am going about this the wrong way? 2012-01-06T14:55:39 well, mine takes 500ms in python 2012-01-06T14:56:17 mine will take forever in php 2012-01-06T14:57:04 *** amstan has joined #aichallenge 2012-01-06T14:57:04 *** ChanServ sets mode: +o amstan 2012-01-06T14:59:41 thestinger: so much easier in pythong 2012-01-06T14:59:43 python 2012-01-06T14:59:47 done lol 2012-01-06T15:01:32 *** TheLinker has joined #aichallenge 2012-01-06T15:01:34 yay, a binomial coefficient one 2012-01-06T15:01:52 thestinger: :) 2012-01-06T15:01:57 ahow984_: damn, correct at last 2012-01-06T15:01:57 I know what you mean now lol 2012-01-06T15:02:05 :) well done mcstar 2012-01-06T15:02:30 it would have been difficult to do that and 2 other (easier) problems in 4hrs though 2012-01-06T15:02:49 and that was only the bronze category :P 2012-01-06T15:03:24 and 1-25 done 2012-01-06T15:03:31 there should be a medal for that 2012-01-06T15:03:49 instead of just at 10 and 100 in a row 2012-01-06T15:03:54 http://sprunge.us/ccXV that's neat looking 2012-01-06T15:04:01 scroll down a bit 2012-01-06T15:04:27 ahow984_: want the code? 2012-01-06T15:04:31 thestinger: random 2012-01-06T15:04:31 lol 2012-01-06T15:04:37 (it can still be wrong, but pretty close) 2012-01-06T15:04:54 thestinger: thats cool :P 2012-01-06T15:04:57 mcstar: please :) 2012-01-06T15:05:33 http://codepad.org/XbZuTT63 2012-01-06T15:05:42 and would someone mind telling me the concept behind doing PE 67? 2012-01-06T15:06:02 mcstar: 2nd line, #include ;) 2012-01-06T15:06:50 yeah, I'd never have gotten that 2012-01-06T15:07:35 53 is easy as hell 2012-01-06T15:08:33 *** jstrong has joined #aichallenge 2012-01-06T15:09:19 *** Accoun has quit IRC () 2012-01-06T15:13:15 23 done 2012-01-06T15:14:18 *** treeform has quit IRC (Remote host closed the connection) 2012-01-06T15:19:50 *** Kurnevsky1 has quit IRC (Quit: Instantbird 1.0) 2012-01-06T15:24:04 *** Accoun has joined #aichallenge 2012-01-06T15:24:57 hm 2012-01-06T15:25:07 thestinger: what was the point of that? 2012-01-06T15:25:38 *** denysonique_ has quit IRC (Remote host closed the connection) 2012-01-06T15:25:39 *** mattswe has quit IRC (Remote host closed the connection) 2012-01-06T15:25:48 mcstar: the point of what? 2012-01-06T15:25:53 53 2012-01-06T15:26:22 lol, 53 2012-01-06T15:27:10 *** mattswe has joined #aichallenge 2012-01-06T15:30:15 thestinger: lol, i see, now i got the same "pattern" that you posted 2012-01-06T15:30:25 i didnt know it was the binomial coefficient 2012-01-06T15:30:33 i got the same in python 2012-01-06T15:30:48 im trying out my new list comprehesion skillz 2012-01-06T15:31:41 thestinger: hm, i dont remember, is there some inline if/else pattern? 2012-01-06T15:31:47 in python? 2012-01-06T15:31:49 like in c, the ternary operator 2012-01-06T15:31:54 yeah 2012-01-06T15:31:55 yes 2012-01-06T15:32:00 x = 5 if True else 6 2012-01-06T15:32:15 :S 2012-01-06T15:32:24 whats that? 2012-01-06T15:32:29 a if b else c 2012-01-06T15:32:33 python's ternary 2012-01-06T15:32:34 nowaqy 2012-01-06T15:32:36 noway 2012-01-06T15:32:45 youre messing with my head 2012-01-06T15:33:22 anyway, what do you need it for? :P 2012-01-06T15:33:24 damn 2012-01-06T15:33:26 its working 2012-01-06T15:33:57 sum([sum([1 if binom(n,k)>10**6 else 0 for k in range(0,n)]) for n in range(1,100)]) 2012-01-06T15:34:24 print(sum(binomial(n, k) > 10**6 for n in range(23, 101) for k in range(1, n))) 2012-01-06T15:34:24 hm 2012-01-06T15:34:32 thats not the same answer i got previously 2012-01-06T15:34:32 True + True is 2 for whatever reason 2012-01-06T15:34:38 dont 2012-01-06T15:34:45 dont f with my brainz 2012-01-06T15:34:45 oh, I thought you had the answer 2012-01-06T15:34:49 i had 2012-01-06T15:34:52 i have 2012-01-06T15:34:57 i just tried it in python 2012-01-06T15:35:04 well, you're nesting 2 list comprehensions 2012-01-06T15:35:06 instead of doing 1 2012-01-06T15:35:39 *** dorisabayon has joined #aichallenge 2012-01-06T15:36:02 [(a, b) | a <- [1..100], b <- [1..a-1], a + b < 50] 2012-01-06T15:36:03 is 2012-01-06T15:36:19 [(a, b) for a in range(101) for b in range(1, a) if a + b < 50] 2012-01-06T15:36:22 *** alehorst has joined #aichallenge 2012-01-06T15:37:04 whats wrong with double comprehension? 2012-01-06T15:37:16 nothing, I guess 2012-01-06T15:37:25 it's not dp? 2012-01-06T15:38:10 mcstar: it does something different though in that case :P 2012-01-06T15:38:18 yours gets 3982 2012-01-06T15:38:26 yes 2012-01-06T15:38:35 instead of 4075 2012-01-06T15:38:45 i did it the same way in mma 2012-01-06T15:38:46 oh, and you don't need a list comprehension there 2012-01-06T15:38:53 you can delete the [] and just use the generalized form 2012-01-06T15:38:56 *** denysonique_ has joined #aichallenge 2012-01-06T15:39:00 *** Fandekasp has quit IRC (Ping timeout: 244 seconds) 2012-01-06T15:39:12 sum(x for x in range(10)) is fine 2012-01-06T15:39:16 that's just the general form 2012-01-06T15:39:36 huh 2012-01-06T15:39:39 yes 2012-01-06T15:39:41 anyway, silly example since that could just be sum(range(10)) 2012-01-06T15:39:47 :) 2012-01-06T15:40:38 Total@Flatten@ 2012-01-06T15:40:40 Table[Table[If[Binomial[n, k] > 1*^6, 1, 0], {k, 0, n}], {n, 1, 2012-01-06T15:40:42 100}] 2012-01-06T15:41:12 wtf is wrong with my python code? 2012-01-06T15:41:24 hm 2012-01-06T15:41:26 sec 2012-01-06T15:41:46 from random testing, my factorial and binomial functions seems right 2012-01-06T15:41:51 That's python? D: 2012-01-06T15:41:56 no 2012-01-06T15:41:58 lol 2012-01-06T15:42:01 he's just showing that it works elsewhere 2012-01-06T15:42:11 mcstar: well, I'm using my binomial function with your code and it doesn't work 2012-01-06T15:42:13 3982 2012-01-06T15:42:17 oh 2012-01-06T15:42:22 that's what you did 2012-01-06T15:42:24 range(1,100) 2012-01-06T15:42:27 is [1..99] 2012-01-06T15:42:34 o.O 2012-01-06T15:42:40 yeah 2012-01-06T15:42:45 should have seen that 2012-01-06T15:44:08 python is getting ambiguous with this compehension syntax 2012-01-06T15:44:09 I actually have an optimized binomial function in python, C++ and haskell from before 2012-01-06T15:44:25 mcstar: well, it works like tuples in python 2012-01-06T15:44:29 (1) is not a tuple 2012-01-06T15:44:34 () are just separators 2012-01-06T15:44:40 sum(x for x in range(10)) should mean calling with 10 arguments 2012-01-06T15:44:40 (1,) is, though 2012-01-06T15:44:44 *** thagomizr has joined #aichallenge 2012-01-06T15:45:04 mcstar: no, it's a generator expression 2012-01-06T15:45:07 it makes an iterable 2012-01-06T15:45:07 haha 2012-01-06T15:45:09 *** TheLinker has quit IRC (Ping timeout: 240 seconds) 2012-01-06T15:45:11 yes, you tell me 2012-01-06T15:45:13 well 2012-01-06T15:45:15 t = 1, 2 2012-01-06T15:45:17 is valid python 2012-01-06T15:45:25 (1,2) 2012-01-06T15:45:26 () around tuples is only there as a separator 2012-01-06T15:45:37 a, b = 1, 2 2012-01-06T15:45:40 that's tuple unpacking 2012-01-06T15:45:42 or 2012-01-06T15:45:45 anyway, i should stop using it 2012-01-06T15:45:49 a, (b, c) = 1, (2, 3) 2012-01-06T15:46:00 x, *xs = [1,2,3,4,5] 2012-01-06T15:46:01 It's a lovely feature 2012-01-06T15:46:11 *** Palmik has quit IRC (Remote host closed the connection) 2012-01-06T15:46:13 * ? 2012-01-06T15:46:15 first, *rest, last = [1,2,3,4,5] 2012-01-06T15:46:19 ah i heard of star before 2012-01-06T15:46:20 mcstar: pattern matching basically 2012-01-06T15:46:22 with somethin zip 2012-01-06T15:46:35 well you can do 2012-01-06T15:46:42 HAven't used * before, that's pretty cool 2012-01-06T15:46:42 for a, b in zip(something, whatever): 2012-01-06T15:46:45 matching function arguments? 2012-01-06T15:46:50 mcstar: that too 2012-01-06T15:46:58 def f(*args): print(args) 2012-01-06T15:47:00 def fun(x,*y): 2012-01-06T15:47:02 yeah 2012-01-06T15:47:12 and ** for named arguments in a dict 2012-01-06T15:47:47 27 seems witty 2012-01-06T15:47:56 x, *xs = range(10) is a python3 feature 2012-01-06T15:48:05 i like when i get to know new facts from these problems 2012-01-06T15:48:09 just extended tuple unpacking basically 2012-01-06T15:48:24 thestinger: pls, dont talk to me about python anymore 2012-01-06T15:48:28 lol 2012-01-06T15:48:32 (only if i explicitely ask you) 2012-01-06T15:48:43 hehe 2012-01-06T15:49:32 Oh, that's awesome 2012-01-06T15:50:10 a, b, c, *z = range(10) 2012-01-06T15:50:12 *** thagomizr has quit IRC (Quit: thagomizr) 2012-01-06T15:51:16 *** ikaros has joined #aichallenge 2012-01-06T15:57:48 *** TheLinker has joined #aichallenge 2012-01-06T16:02:36 thestinger: btw, do you know sage? its on opensource mathematica alternative 2012-01-06T16:02:46 I know of it, but I haven't tried it 2012-01-06T16:02:51 why i really liked it, is that it has a nice notebook interface 2012-01-06T16:03:11 you can have these notebooks, very comfortable, and have it all in the browser 2012-01-06T16:03:26 anyway, it was the best python interaction i could find 2012-01-06T16:06:09 *** Redgis has joined #aichallenge 2012-01-06T16:26:54 http://projecteuler.net/problem=40 lol, going to try brute force on this 2012-01-06T16:26:55 amstan: i've already got access to the main repo :-) 2012-01-06T16:27:31 amstan: and check the example-game.sh script on how to run a game 2012-01-06T16:27:41 aerique: mcleopold suggested that we delay work on games, so we don't have the situation we had last time(with people getting awesome in beta) 2012-01-06T16:28:04 amstan: yeah, he has a point 2012-01-06T16:28:48 amstan: but how to evaluate the game ideas then? just discuss them and decide on one? 2012-01-06T16:30:03 what he means is that we should only concentrate on the game after we have the rest of the framework ready 2012-01-06T16:30:38 http://codepad.org/Tb0GLZCR 2012-01-06T16:30:48 Problem 18 (the smaller triangle one) 2012-01-06T16:31:06 ahow984_: try the big one now :) 2012-01-06T16:31:20 I will once this one works ;) 2012-01-06T16:32:17 amstan: oh, i thought the framework was ready :) what needs to be done still? 2012-01-06T16:32:23 everything 2012-01-06T16:32:28 we're replacing php with django 2012-01-06T16:32:44 mcstar: any idea whats making it not give the right answer? 2012-01-06T16:33:06 ahow984_: what does not? 2012-01-06T16:33:30 my code in the codepad link 2012-01-06T16:34:01 oh! i get how to solve that! 2012-01-06T16:34:04 you start from the bottom 2012-01-06T16:34:18 yeah, but I'm starting from the top because it's easier :P 2012-01-06T16:34:31 (it's not) 2012-01-06T16:34:44 oh? 2012-01-06T16:35:00 amstan: yeah, that's how I did it 2012-01-06T16:35:01 and then always expand the one that has a bigger sum 2012-01-06T16:35:07 or something 2012-01-06T16:35:14 And he scores 2012-01-06T16:35:19 yup, I did that 2012-01-06T16:35:29 well.. i was following ahow984_'s code 2012-01-06T16:35:35 :P 2012-01-06T16:35:38 but i realized that a ton of calculations are repeated 2012-01-06T16:35:44 you mean, the one that doesn't work? :P 2012-01-06T16:35:48 i was thinking of ways of caching it 2012-01-06T16:35:58 amstan: http://sprunge.us/bEjN that was mine (for the bigger triangle) 2012-01-06T16:36:00 starting from the bottom does that 2012-01-06T16:37:00 yeah, because from the bottom you only go through all elements once 2012-01-06T16:37:08 yeah, you choose the bigger sum and just work up to the top 2012-01-06T16:37:09 from the top you go a lot of times 2012-01-06T16:37:28 I've been 'working' on 24 for far too long now 2012-01-06T16:38:15 Well, from the the top you can do almost the same thing actually 2012-01-06T16:38:42 Sum the upper number to both the lower ones and then at the lowest take the max 2012-01-06T16:38:44 so any ideas whats wrong with my code? 2012-01-06T16:39:15 None whatsoever 2012-01-06T16:40:22 pairofdice: did you try it for the 3 element triangle case? 2012-01-06T16:41:22 anyone? anyone? 2012-01-06T16:41:23 well it's not quite so straightforward 2012-01-06T16:41:54 ahow984_: did you try it for the 3 element triangle case 2012-01-06T16:42:01 pairofdice: sorry, i meant to send it to him ^ 2012-01-06T16:42:08 oh, no 2012-01-06T16:42:17 ^^ 2012-01-06T16:42:18 it should help.. 2012-01-06T16:42:18 I thought that was @pairofdice :P 2012-01-06T16:42:51 lol fail 2012-01-06T16:42:53 ok 2012-01-06T16:42:58 I'll make this one work first 2012-01-06T16:46:48 *** mleise has quit IRC (Quit: Leaving.) 2012-01-06T16:49:33 :) 2012-01-06T16:49:54 stupid indexing error. had x, y+1 instead of x+1, y >_< 2012-01-06T16:50:32 ahow984_: now do bottom up 2012-01-06T16:50:51 amstan: yup, thats problem 67 iirc :P 2012-01-06T16:52:19 meh, why did I bother writing this in C++ 2012-01-06T16:52:37 thestinger: pypy? 2012-01-06T16:52:42 well 2012-01-06T16:52:49 it would have been fine in py3 is what I'm saying 2012-01-06T16:52:51 lol 2012-01-06T16:52:53 http://projecteuler.net/problem=40 2012-01-06T16:52:56 I just brute forced that 2012-01-06T16:53:18 http://sprunge.us/JeVg <- lol 2012-01-06T16:53:28 some of the questions are silly... 2012-01-06T16:53:35 anyway it takes 50ms 2012-01-06T16:53:50 s/some/all 2012-01-06T16:53:58 *** mleise has joined #aichallenge 2012-01-06T16:54:03 there is _no_ practical use to any of them :P 2012-01-06T16:54:11 ahow984_: there is 2012-01-06T16:54:16 lots are combinatorics stuff 2012-01-06T16:54:25 grrr combinatorics 2012-01-06T16:54:42 well.. the idea with most of those is that your algorithm gives you the speed boost, not the language 2012-01-06T16:54:44 same in aichallenge 2012-01-06T16:55:14 well, I never really have trouble with speed 2012-01-06T16:55:26 once I get a proper algorithm 2012-01-06T16:55:45 You struck the point squarely there 2012-01-06T16:55:48 but some questions like this can just be solved with brute force easily... 2012-01-06T16:55:58 I feel like I'm missing something by solving it this way 2012-01-06T16:59:05 *** mleise has quit IRC (Quit: Leaving.) 2012-01-06T17:02:43 oh, I think I figured out a proper solution 2012-01-06T17:05:17 *** Israfel has quit IRC (Ping timeout: 244 seconds) 2012-01-06T17:18:33 *** Israfel has joined #aichallenge 2012-01-06T17:19:15 question 80 is another that seems way too easy 2012-01-06T17:20:08 http://sprunge.us/hgTB easy enough to get that in two lines of code... I'm not sure why they have these questions 2012-01-06T17:26:04 *** Akranis has quit IRC (Quit: Lämnar) 2012-01-06T17:31:55 people like me thestinger, because of people like me ;) 2012-01-06T17:35:30 oh, I don't even need to do decimal.Decimal(n) * decimal.Decimal(0.5), they have a sqrt method 2012-01-06T17:38:07 *** TheLinker has quit IRC (Quit: Bye) 2012-01-06T17:47:56 *** alehorst has quit IRC (Ping timeout: 240 seconds) 2012-01-06T17:52:38 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-01-06T17:53:59 *** chris_0076 has joined #aichallenge 2012-01-06T17:54:52 anyway... I have arbitrary precision sqrt and isqrt coded in C++, but I don't want to mess with gmp when I can just use that... 2012-01-06T17:55:20 http://sprunge.us/JZfB anyway there's my silly way of solving 80 2012-01-06T18:02:49 *** AlliedEnvy has quit IRC (Remote host closed the connection) 2012-01-06T18:12:39 *** AlliedEnvy has joined #aichallenge 2012-01-06T18:20:29 *** AlliedEnvy has quit IRC (Ping timeout: 240 seconds) 2012-01-06T18:27:00 *** Jak_o_Shadows has joined #aichallenge 2012-01-06T18:30:30 *** Redgis has quit IRC (Quit: ... mains libres) 2012-01-06T18:35:56 *** Fandekasp has joined #aichallenge 2012-01-06T18:39:58 *** dorisabayon has quit IRC (Ping timeout: 276 seconds) 2012-01-06T18:42:57 *** AlliedEnvy has joined #aichallenge 2012-01-06T18:50:27 sooooo #aichallenge? :P 2012-01-06T18:51:49 *** AlliedEnvy has quit IRC (Ping timeout: 240 seconds) 2012-01-06T19:03:42 *** amstan has quit IRC (Quit: Konversation terminated!) 2012-01-06T19:04:11 *** amstan has joined #aichallenge 2012-01-06T19:04:11 *** ChanServ sets mode: +o amstan 2012-01-06T19:04:29 *** choas has quit IRC (Ping timeout: 240 seconds) 2012-01-06T19:05:13 *** AlliedEnvy has joined #aichallenge 2012-01-06T19:05:34 thestinger: do i need to sum only the digits after the . ? 2012-01-06T19:06:04 *** Garf has quit IRC (Quit: Make a new plan, Stan!) 2012-01-06T19:08:24 I do believe so 2012-01-06T19:09:05 Hmm 2012-01-06T19:09:30 Try it for sqrt(2) 2012-01-06T19:09:46 mcstar: no 2012-01-06T19:09:47 all of them 2012-01-06T19:09:56 ah 2012-01-06T19:10:06 i thought .[100] is needed 2012-01-06T19:10:13 I tested with sqrt(2) at first and it tricked me 2012-01-06T19:10:27 because I only did 100 digits of precision, and I need more to get the right answer 2012-01-06T19:10:49 so the sum of the digits after the . was correct, but the digits at the end were wrong :P 2012-01-06T19:10:57 digit at the end* 2012-01-06T19:11:01 i know my digits are good 2012-01-06T19:11:23 im still confused from where to count the 100 digits 2012-01-06T19:11:30 well 2012-01-06T19:11:30 From the start 2012-01-06T19:11:32 1.25 2012-01-06T19:11:34 3 digits 2012-01-06T19:11:36 ok 2012-01-06T19:11:41 thats stupid 2012-01-06T19:11:46 but ill do it 2012-01-06T19:12:06 anyway I got the string of digits in an awkward way 2012-01-06T19:12:37 I guess I could have just removed the . 2012-01-06T19:12:40 I'll change it 2012-01-06T19:13:38 *** sigh has joined #aichallenge 2012-01-06T19:13:55 yay 2012-01-06T19:14:41 string.replace('.', '0') I guess that works 2012-01-06T19:14:50 D: 2012-01-06T19:14:52 lol 2012-01-06T19:14:57 well, I have a map() 2012-01-06T19:15:07 so I'll just do filter() or turn it into a generator expression 2012-01-06T19:15:08 thestinger: http://codepad.org/dX6f3FzI 2012-01-06T19:15:57 hm 2012-01-06T19:16:14 python has decimal module with arbitrary precision? 2012-01-06T19:16:49 yes 2012-01-06T19:17:18 hm, i could eliminate a lambda 2012-01-06T19:17:33 that saves 7 characters 2012-01-06T19:17:37 http://sprunge.us/VBgU anyway that's what it is now 2012-01-06T19:18:06 I was just doing **0.5 but they actually have a .sqrt() method 2012-01-06T19:18:18 well, i wrote my sqrt 2012-01-06T19:18:34 and just scaled up the number so i always get an integer 2012-01-06T19:18:44 ah 2012-01-06T19:18:49 oh ^^ 2012-01-06T19:18:57 in C++ I would have written it, but I would have had to use gmp anyway... 2012-01-06T19:20:37 oh, I screwed up the indentation with that change 2012-01-06T19:20:38 whatever 2012-01-06T19:20:47 thestinger: how do you remove square numbers? 2012-01-06T19:20:56 a dirty hack :D 2012-01-06T19:21:00 if str(d).find(".") != -1 2012-01-06T19:21:03 if they don't have a . 2012-01-06T19:21:05 lol 2012-01-06T19:21:38 ah fuck 2012-01-06T19:21:46 i was still thinking in my integers 2012-01-06T19:21:50 not your floats 2012-01-06T19:26:11 http://projecteuler.net/problem=45 that looks easy 2012-01-06T19:26:20 dunno why I skipped it 2012-01-06T19:26:40 it seems like I skipped all the easy ones... 2012-01-06T19:29:37 *** grc48 has joined #aichallenge 2012-01-06T19:30:13 *** epicmonkey has quit IRC (Ping timeout: 248 seconds) 2012-01-06T19:33:38 *** amstan has quit IRC (Ping timeout: 240 seconds) 2012-01-06T19:41:47 *** iglo has joined #aichallenge 2012-01-06T19:45:10 *** dapplegate has quit IRC (Quit: Ex-Chat) 2012-01-06T19:48:20 *** ikaros has quit IRC (Quit: Ex-Chat) 2012-01-06T19:49:47 thestinger: the answer for that is quite large 2012-01-06T19:49:50 can't remember doing it though 2012-01-06T19:52:17 45? 2012-01-06T19:52:19 easy :P 2012-01-06T19:53:06 *** McLeopold has quit IRC (Quit: Leaving.) 2012-01-06T19:53:28 ah this sucked 2012-01-06T19:54:14 http://codepad.org/xLhSaNdD 2012-01-06T19:54:31 which is that? 2012-01-06T19:54:35 45 2012-01-06T19:54:36 oh 2012-01-06T19:54:38 yeah 2012-01-06T19:54:53 pretty ugly 2012-01-06T19:55:02 hexagonal numbers are triangle numbers 2012-01-06T19:56:26 anyway, I want to make my solution nicer 2012-01-06T19:57:17 I guess I could just make is_pentagonal 2012-01-06T19:57:27 i didnt know how to represent the state of the computation except with arguments :( 2012-01-06T19:58:23 *** chris_0076 has quit IRC (Ping timeout: 252 seconds) 2012-01-06T19:58:56 oh, you can just solve the equation 2012-01-06T20:00:53 again, im doing them to excercise(mainly haskell, except when i dunno how) 2012-01-06T20:01:09 yeah 2012-01-06T20:01:15 I like doing them a few different ways 2012-01-06T20:01:20 and then figuring out how to optimize 2012-01-06T20:01:26 *** foRei has quit IRC (Quit: Bye) 2012-01-06T20:01:39 2am here 2012-01-06T20:01:43 bb 2012-01-06T20:01:45 cya 2012-01-06T20:01:47 *** mcstar has quit IRC (Quit: mcstar) 2012-01-06T20:06:19 http://sprunge.us/TTVW there's my nice solution to 45 after optimizing a bit 2012-01-06T20:06:53 well 2012-01-06T20:07:01 left in an evil global :P 2012-01-06T20:07:08 s/global/magic number/ 2012-01-06T20:07:43 http://sprunge.us/KUXE non-ugly version 2012-01-06T20:25:54 *** ahow984_ has quit IRC (Quit: leaving) 2012-01-06T20:46:11 *** iglo has quit IRC (Remote host closed the connection) 2012-01-06T21:01:46 thestinger: take a look at problem 344 2012-01-06T21:01:49 it looks cool 2012-01-06T21:01:56 dealing with the large numbers doesn't seem so fun 2012-01-06T21:02:43 i imagine the game solution isn't far off being like nim 2012-01-06T21:05:40 you guys are still on? 2012-01-06T21:05:41 heh 2012-01-06T21:05:54 it's 1pm :P 2012-01-06T21:06:14 4am D: 2012-01-06T21:06:19 9pm 2012-01-06T21:06:27 it's also summer, suckers :P 2012-01-06T21:06:52 it's 20 F out hah 2012-01-06T21:07:34 What's that in human readable 2012-01-06T21:07:53 -7 2012-01-06T21:08:04 colder than here, heh 2012-01-06T21:09:55 it's 21C outside according to my computer 2012-01-06T21:10:23 i'ma go do some stuff in the yard 2012-01-06T21:10:42 In the warm, 2012-01-06T21:36:47 *** dorisabayon has joined #aichallenge 2012-01-06T21:37:38 *** JorgeB has quit IRC (Quit: Computer has gone to sleep.) 2012-01-06T21:40:28 *** Fandekasp has quit IRC (Ping timeout: 268 seconds) 2012-01-06T22:27:27 *** amstan has joined #aichallenge 2012-01-06T22:27:27 *** ChanServ sets mode: +o amstan 2012-01-06T22:33:48 *** amstan has quit IRC (Quit: Konversation terminated!) 2012-01-06T22:35:28 *** amstan has joined #aichallenge 2012-01-06T22:35:28 *** ChanServ sets mode: +o amstan 2012-01-06T22:43:30 *** sigh has quit IRC (Remote host closed the connection) 2012-01-06T22:44:29 *** chris_0076 has joined #aichallenge 2012-01-06T22:55:57 *** chris_0076 has quit IRC (Quit: Leaving) 2012-01-06T22:58:03 *** Chris_0076 has joined #aichallenge 2012-01-06T23:10:58 *** Guest68563 has joined #aichallenge 2012-01-06T23:11:02 hi 2012-01-06T23:11:46 *** Guest68563 is now known as Logician 2012-01-06T23:16:01 *** Blkt has quit IRC (Remote host closed the connection) 2012-01-06T23:27:47 Logician: hi! 2012-01-06T23:29:03 hey antimatroid 2012-01-06T23:29:08 what's up! 2012-01-06T23:29:31 lunch 2012-01-06T23:31:04 you live in japan or something? 2012-01-06T23:34:01 jk 2012-01-06T23:41:37 *** Jak_o_Shadows has quit IRC (Remote host closed the connection) 2012-01-06T23:44:14 tasmania :) 2012-01-06T23:44:47 mm Australia right? 2012-01-06T23:58:46 yep 2012-01-06T23:58:50 the little island on the bottom 2012-01-06T23:59:06 next stop antarctica