« first day (1904 days earlier)      last day (2926 days later) » 

3:00 AM
@PhiNotPi My thoughts exactly right now. It's probably very broken.
 
I might have an answer for C
\o/
 
Wow, my C large answer might time out
I have C small working after a long stream of mistakes.
 
@PhiNotPi did you go on an avocado diet?
 
;-;
My C large is about to time out
 
SHIT
I just found an O(n^2) solution for B
 
3:05 AM
please don't talk about runtime complexities
that's getting super close to collaborating
 
@QPaysTaxes Thanks to your diligence, I have eaten.
@QPaysTaxes It's disallowed for Google Code Jam
Yep
 
Welp, I didn't make the top 1000.
 
yay I solved B
 
I gave up after I failed A large
 
@NathanMerrill Wait, you failed A large?
 
3:09 AM
yeah
it was related to file input
not actually to the challenge
 
What language?
 
python
 
use this
so file input won't ever be a problem
(well, it's a lot easier for me)
 
Is round A1 historically the most competitive of the rounds?
 
it makes the most sense
 
3:15 AM
I would assume so.
 
you remove (ideally) the top 1000 competitors
 
I'm ranked 1295 right now.
It would have been a lot nicer if my C weren't garbage.
When I first started working on C, there were < 100 attempts at it.
 
finally fixed all bugs on c
 
We can't discuss how to solve the problems until about 9 minutes from now.
 
And I get it wrong :/
 
3:22 AM
There should be a "watch" button
ranked 1339 now
 
how's it going guys? :)
 
after the round is over, I'd be interested in bugs you ran into
 
@aditsu sucky :/
 
3:25 AM
aww
well, I don't have time to write C large, so I'm stopping
 
I'm going to blame bugs, not my algorithm :)
 
@TheNumberOne I'm going to blame Python, not me
 
I used a few more languages :p
and still did some golfing
 
I'm curious what a non-brute-force solution to C would be.
 
I just read C
isn't it "find the largest cycle"?
 
3:27 AM
no
 
I have the right algorithm for C I think. I just can't find my bugs :/
@NathanMerrill no
 
it's graph stuff, but more complicated than largest cycle
the last example is not a cycle
 
welp, I'll probably have to do 100s of pushups D:
 
My C large was still running, and I stopped it.
 
actually I shouldn't be talking
I'll wait 59 secs
 
3:29 AM
There's like < 1 minute left
ninja'd
 
well, it's not like somebody will suddenly figure it out and implement it in the remaining minute
 
C is not so complicated. There are basically 2 cases. One of them is the largest cycle. And the other case is something different.
 
shh...
 
@aditsu have you seen the people on this site?
7
 
heh
 
3:30 AM
it's ended
 
1424 ending rank
 
3964
given up 1A-c
 
anyways, for each person, you can compile a list of people they are "allowed" to sit next to
 
worse
 
6600 :/
 
3:30 AM
either that they are BFFs with
or BFF of
 
@Jakube what's the other case?
now that its over
 
A tried to detect cycles or bowties
 
@TheNumberOne did you do 1A-b?
 
therefore, you go through the graph, and find the largest cycle
 
@Dennis Hi!
 
3:31 AM
@TheNumberOne It's more than just "bowties" though.
 
...
 
->->*<=>*<-<-
 
the other case is finding the longest self-contained chains that have a 2-cycle, and putting them all together
 
@KennyLau I failed.
 
Congrats @Jakube and @Sp3000!
6
 
3:31 AM
@TheNumberOne Anyways, each element is duplicated in the lists
@TheNumberOne And the list removed has distinct elements
 
hint for C: when you find a cycle, those children can not be part of another cycle
 
 Place  Rank                 Name  Points  Penalty
   1st   264               Jakube     100  1:16:04
   2nd   756               Sp3000     100  2:06:19
   3rd  1393               aditsu      71  2:07:48
   4th  1425             PhiNotPi      71  2:14:29
   5th  1481       DennisMitchell      71  2:28:33
   6th  2282           BrainSteel      55    49:25
   7th  2544                 xsot      55    58:20
   8th  3900             kennylau      55  2:07:32
   9th  4744          TheOnlyMego      20    05:46
 
@TheNumberOne Which makes their count... odd....
 
wooo last :)
 
@MarsUltor Where's me?
 
3:32 AM
well, good news, I have a chance to use even more languages
bad news, I kinda ran out of languages I know
 
we can talk now?
 
ya
 
I just have java left now
 
So, Jakube and Sp3000 are definitely moving on. We still have two more rounds for the others to make it.
 
@Jakube can you post your C code?
 
3:33 AM
@TheNumberOne What's your GCJ username?
 
woah, 52% acceptance rate
 
I didn't compete, but since for C we know n = 1000, which is small, you can just use repeated brent's cycle detection
 
@KennyLau I thought of that and then "proved" to myself that that was wrong :/
 
For those unaware, the trick to B was to find unpaired numbers.
 
@MarsUltor TheNumberOne
 
3:33 AM
I golfed A and B small
 
  14th  7615         TheNumberOne      20    34:01
 
@Jakube ty
 
Forgot usernames were case sensitive
 
Ok, back to my original request: what bugs did you guys run into while coding?
 
3:34 AM
@PhiNotPi C was basically a bowties with the center as a 2-cycle.
 
(whether the bugs were related to the challenge or not)
 
maybe I should've competed :(
 
@NathanMerrill shallow copying, putting stuff inside loops that should be outside, etc.
 
I think I would've gotten sub 30, sub 45 for sure
 
I had one bug where I reused a counter variable
 
3:35 AM
@Jakube so possibility 2 was basically that everyone's bff works out with out wrapping around?
 
I just don't like stress coding
 
I had a bug where the list of kids that didn't have any best friends was somehow empty always.
 
@PhiNotPi @aditsu can you expand?
 
@NathanMerrill In B I wanted to read the N (the length of the matrix) with int N; cin >> N; but forgot the cin >> n part. Wondered for a few minutes why I didn't get any output.
 
@Jakube why code in C++ for speedcoding though?
 
3:36 AM
@orlp It's the most popular language for GCJ
 
@orlp Because the solution runs faster.
 
@NathanMerrill I had one bug ... kidding, I had a for(i...) and then reused i in another for loop inside it
 
Twice as popular as Java/Python
 
oooh, that brings up a good language design question
 
@Maltysen Yes.
 
3:37 AM
@Jakube isn't programmer time what costs you, not runtime?
did you write a single program that ran for more than 1 second?
 
@orlp Some brute forces may be too slow
 
should uninitialized variables be allowed
why?
 
@NathanMerrill what do you mean with that
 
@orlp Python-style foo=1
 
aka, is var a; a code smell?
 
3:38 AM
@orlp No, C-large was the slowest with 0.7 seconds.
 
anyway, I noticed and fixed my bug between downloading the code and submitting the solution
 
@MarsUltor that's not uninitialized though
 
@QPaysTaxes python does it best with n = b if a else c
 
0
Q: How to find several rectangles with minimum area to cover the red cells?

user53063 In Figure 1, (a) is the input mesh, we want to find several rectangles to cover the red cells in (a), at the same time, the sum area of these rectangles should be as small as possible. Figure 1(b) and Figure 1(c) are two ways. Obviously, (c) is a better way due to the smaller sum of area the gr...

 
let n: i32 = if a { b } else { c }; // Rust :)
 
3:38 AM
@Jakube Congrats :) Also, nice work on getting C so fast :P
 
IMO uninitialized variables should be allowed
 
then its a function.
 
but only for writing to them
not for reading them
 
let n: i32 = if a {
    doSomeStuff();
    someMoreStuff();
    andMoreStuff()
} else {
    otherStuff()
};
 
@Doorknob I really like that
 
3:40 AM
@aditsu I have a very unholy mess of CJam for C small. :P
 
let n: i32 = functionThatReturnsAnOption().unwrap_or(default_value);
 
the only other time I can think that people use uninitialized variables is in try/catch blocks
which I'm trying to think of another way of doing
because I can't stand try/catch blocks
 
@QPaysTaxes nil is broken :(
 
all right
I'm gna try to do C now
let's see how long it takes me
(5:41 now)
 
let n: i32 = try!(someFuncThatReturnsResult()); // expands to return Err if func returns Err, Ok(x) otherwise
 
3:42 AM
Dennis' mess:
li{"Case #"V):V": "]o

li:L;l~]:(:K;L,{a{_W=K=|}L*}%{)K=\1>W<#W=},:X{X\f#:e>1<},_{_)K=#!1$W%)K=#!|\,2>&},_@@-
2m*{~:B\:A&{AB&BW%2<={ABW%|}A?}{AB+}?}%:$Q|_,{[2m*{~:B\:A&A{AB|}?}/]:$Q|}*
+:,:e>

N]o}*
 
@Sp3000 Congrats to you too. I also messed up C a few times. But the examples cases pushed me towards the correct solution a little bit each time.
 
@Doorknob var n = if (a) b else c in kotlin :P
 
@Doorknob I can't do "return Err", because I'm enforcing types
 
Well I overslept through most of the first of two classes and still missed 1A
 
@QPaysTaxes same with kotlin
 
3:42 AM
@QPaysTaxes He used CJam because it's less to type, and he's really familiar with it
 
Yup
 
struct Result { Ok(T), Err(V) };
or:
 
I only opened 1A 15 minutes ago :D
Almost exactly two minutes before the end
 
I used 3 more languages this round, total so far should be 11
 
Didn't even try A-small though I had a solution :P
 
3:44 AM
@Jakube The examples don't have a case of multiple bowties, so that's what took me 2 hours (i.e. after I finally decided to try random small cases) :P
 
too many messages got posted in between so I gave up because there would be no context :(
I was going to mention result.unwrap_or_else(|_| computeDefaultValue())
 
Well done, guys. Unofficial results: Winners are Jakube and Sp3000.
 
blech. I'm still not a fan of returning errors, even if it is typesafe
 
@Jakube what are bowties?
 
@QPaysTaxes I know
 
3:47 AM
@Sp3000 This piece I figured out quite early. Although at the beginning I though only of multiple Pairs like A<=>B and forgot the chains on both ends.
 
I could listen to this guy talk all day.
 
@QPaysTaxes it just calls the lambda variable _, which is Rust's "black hole" variable meaning "ignore this"
 
@Maltysen Something like this: A->B<=>C<-D
 
@QPaysTaxes In Ruby it's just another variable name
In Rust it has a special meaning
 
3:49 AM
@Jakube ohhhh I see
 
@QPaysTaxes is it? how?
oh yeah, Rust does the same
 
   1st   264               Jakube     100  1:16:04
   2nd   756               Sp3000     100  2:06:19
   3rd  1393               aditsu      71  2:07:48
   4th  1425             PhiNotPi      71  2:14:29
   5th  1481       DennisMitchell      71  2:28:33
   6th  2282           BrainSteel      55    49:25
   7th  2544                 xsot      55    58:20
   8th  3900             kennylau      55  2:07:32
   9th  4744          TheOnlyMego      20    05:46
  10th  4792         KeyboardFire      20    07:20
Downgoat, RikerW, molarmanful, winny3.14 and zachgates7 are excluded from the contest.
 
@zyabin101 D: there is no Downgoat
@zyabin101 why?
 
@Downgoat They didn't qualify in the Qualification Round.
 
3:51 AM
:(
 
s/They/you/
 
s/you/you and them/
 
Round 1B starts April 30 at 16:00 UTC.
 
oh, I thought it was in 1 week
 
@zyabin101 i'll be practicing my graph theory
 
3:52 AM
:29054380 lulz
 
> 14 days is a week - Downgoat
8
 
Tell us when it is where you live.
19:00 here.
 
@Maltysen please do not star this. I do not what everyone thinking I am an idiot
 
11:53, I should get a couple of hours of sleep
 
@aditsu why sleep when TNB?
 
3:54 AM
because I didn't sleep at night, and I have things to do later
 
10:54 AM
 
@aditsu what does sleep give you that we don't
@QPaysTaxes I said besides sanity
 
rest, energy..
 
but I accidentaly deleted it\
 
@QPaysTaxes hi
 
3:54 AM
18 secs ago, by Downgoat
but I accidentaly deleted it\
 
I see some other people here did GCJ.
I was surprised how easy the problems were in this round 1.
 
@Maltysen Relevant: gawker.com/…
 
@feersum do you mean the koala-fication round or round A1?
 
The one that was a couple hours ago.
 
oh ok
 
3:57 AM
@feersum did you participate?
 
I got done around the halfway point.
 
and @zyabin101 and I thought we got all the ppcj'ers on the list...
 
I don't have the same nickname as here so you wouldn't be able to find it.
 
@feersum is it feerdifference?
 
3:59 AM
@feersum feel free to add yourself here
 
anyone want to teach me 1A-c?
 

« first day (1904 days earlier)      last day (2926 days later) »