L19 Programming Problem Championship: Round 2 (Strings)
-
Kirby
- Honinbo
- Posts: 9553
- Joined: Wed Feb 24, 2010 6:04 pm
- GD Posts: 0
- KGS: Kirby
- Tygem: 커비라고해
- Has thanked: 1583 times
- Been thanked: 1707 times
Re: L19 Programming Problem Championship: Round 2
I spent some time on this last night and got problem 2. I had to keep a table to store information about the indexes of words to make it work. My first idea went out of memory from copying the whole strings. Problem 1 I actually did on Friday before meeting with my parents.
If I have time I might look at the others tonight, but 3 and 4 didn't look simple. Problem 5 seems possible to do if I can formalize the string pattern and construct a string given the input. With a formalized pattern that shouldn't be too hard.
I see a lot of people participating. Are they all from L19?
If I have time I might look at the others tonight, but 3 and 4 didn't look simple. Problem 5 seems possible to do if I can formalize the string pattern and construct a string given the input. With a formalized pattern that shouldn't be too hard.
I see a lot of people participating. Are they all from L19?
be immersed
-
peti29
- Lives with ko
- Posts: 125
- Joined: Mon Feb 17, 2014 2:41 am
- Rank: KGS 5 kyu
- GD Posts: 0
- Has thanked: 13 times
- Been thanked: 12 times
Re: L19 Programming Problem Championship: Round 2
Problem C has been such a zen-like experience: I've made so much progress, still I'm running out of time at the exact same test case...
-
bernds
- Lives with ko
- Posts: 259
- Joined: Sun Apr 30, 2017 11:18 pm
- Rank: 2d
- GD Posts: 0
- Has thanked: 46 times
- Been thanked: 116 times
Re: L19 Programming Problem Championship: Round 2
Problem 4 has interesting stats: few people have solved it, but pretty much all of them got it right first try. So maybe it isn't that hard, but I've not really had a breakthrough and I need to go to bed. Followed some false leads thinking that the concepts I used in problem 3 would be relevant again - that wasted a fair chunk of time.
- Solomon
- Gosei
- Posts: 1848
- Joined: Tue Apr 20, 2010 9:21 pm
- Rank: AGA 5d
- GD Posts: 0
- KGS: Capsule 4d
- Tygem: 치킨까스 5d
- Location: Bellevue, WA
- Has thanked: 90 times
- Been thanked: 835 times
Re: L19 Programming Problem Championship: Round 2
Spent the whole day at the Seattle Go Center for the Spring tournament, so unfortunately couldn't make much progress on D or E. I'll see if I can try to at least get E, since it doesn't seem to a problem with much coding and is more of a combinatorics problem (there's a particular sequence on OEIS I've been eyeing...).
- Solomon
- Gosei
- Posts: 1848
- Joined: Tue Apr 20, 2010 9:21 pm
- Rank: AGA 5d
- GD Posts: 0
- KGS: Capsule 4d
- Tygem: 치킨까스 5d
- Location: Bellevue, WA
- Has thanked: 90 times
- Been thanked: 835 times
Re: L19 Programming Problem Championship: Round 2
At least 10 in this round are from L19.Kirby wrote:I see a lot of people participating. Are they all from L19?
Re: L19 Programming Problem Championship: Round 2
Thanks for setting up the contest.
I had (I think) working Python solutions for C and E, but hit the time limit exceeded problem (especially frustrating for problem E since on my laptop all test cases up to n = 10^18 and varying k - which I think should be the slowest ones within the problem specification - ran in below 1 second ...). Rewriting in a compiled language would have helped, I suppose, but did not seem to be a good way to spend my time. I did not use any math/combinatorics, though, maybe I should have thought more about that.
For the curious, I put my solutions/attempts on github: https://github.com/ugoertz/l19contest. Comments welcome!
Best regards, Ulrich
I had (I think) working Python solutions for C and E, but hit the time limit exceeded problem (especially frustrating for problem E since on my laptop all test cases up to n = 10^18 and varying k - which I think should be the slowest ones within the problem specification - ran in below 1 second ...). Rewriting in a compiled language would have helped, I suppose, but did not seem to be a good way to spend my time. I did not use any math/combinatorics, though, maybe I should have thought more about that.
For the curious, I put my solutions/attempts on github: https://github.com/ugoertz/l19contest. Comments welcome!
Best regards, Ulrich
- Solomon
- Gosei
- Posts: 1848
- Joined: Tue Apr 20, 2010 9:21 pm
- Rank: AGA 5d
- GD Posts: 0
- KGS: Capsule 4d
- Tygem: 치킨까스 5d
- Location: Bellevue, WA
- Has thanked: 90 times
- Been thanked: 835 times
Re: L19 Programming Problem Championship: Round 2
About to go to sleep, will post what I managed to solve in the morning and update the leaderboard. I'm thinking maybe for next round, to put up 2 easy, 2 medium, 2 hard instead of 1 easy, 1 medium, and 3 hard. What do you guys think? I'm also open to suggestions for next week's theme.
-
tj86430
- Gosei
- Posts: 1348
- Joined: Wed Apr 28, 2010 12:42 am
- Rank: FGA 7k GoR 1297
- GD Posts: 0
- Location: Finland
- Has thanked: 49 times
- Been thanked: 129 times
Re: L19 Programming Problem Championship: Round 2
BTW, is it possible to submit solutions after the round has closed and to get feedback whether the solution would have been accepted? There are some problems I'd like to try, but I don't usually (read: ever) have time to do those within set timeframe. I might try during e.g. summer vacation, though.
Offending ad removed
-
peti29
- Lives with ko
- Posts: 125
- Joined: Mon Feb 17, 2014 2:41 am
- Rank: KGS 5 kyu
- GD Posts: 0
- Has thanked: 13 times
- Been thanked: 12 times
Re: L19 Programming Problem Championship: Round 2
So thank you Solomon for arranging this! It was fun even though I had little time to take part. (I'd ask for an earlier start next time in order for us living in GMT+ countries to be able to start Friday night)
Spoiler from here on...
Spoiler from here on...
-
bernds
- Lives with ko
- Posts: 259
- Joined: Sun Apr 30, 2017 11:18 pm
- Rank: 2d
- GD Posts: 0
- Has thanked: 46 times
- Been thanked: 116 times
Re: L19 Programming Problem Championship: Round 2
I was thinking of doing something like this after the first round, but decided against it - having the solutions googleable kind of breaks the concept of contest web sites. On the other hand, it is nice to be able to discuss each other's approaches and solutions. Hmm. (I clearly need to learn Python better, I can't even tell what you're doing in some of these.)ugoertz wrote:For the curious, I put my solutions/attempts on github: https://github.com/ugoertz/l19contest. Comments welcome!
-
bernds
- Lives with ko
- Posts: 259
- Joined: Sun Apr 30, 2017 11:18 pm
- Rank: 2d
- GD Posts: 0
- Has thanked: 46 times
- Been thanked: 116 times
Re: L19 Programming Problem Championship: Round 2
I'll let you go first this time and post at my thoughts later if I have anything to add. Still thinking about putting up source.Solomon wrote:About to go to sleep, will post what I managed to solve in the morning
Sounds like a good plan, but to me it felt like this week we had trivial/easy/medium/hard/hard-ish. I'm not sure we need more than one instance of things like bishops or autori each week.I'm thinking maybe for next round, to put up 2 easy, 2 medium, 2 hard instead of 1 easy, 1 medium, and 3 hard. What do you guys think? I'm also open to suggestions for next week's theme.
What themes are available?
-
jeromie
- Lives in sente
- Posts: 902
- Joined: Fri Jan 31, 2014 7:12 pm
- Rank: AGA 3k
- GD Posts: 0
- Universal go server handle: jeromie
- Location: Fort Collins, CO
- Has thanked: 319 times
- Been thanked: 287 times
Re: L19 Programming Problem Championship: Round 2
I thought the difficulty level was ok. Problem A was trivial. Problem B was in the sweet spot where a naive implementation would not work but optimization wasn't too difficult, so that was fun. I didn't solve problem C, but it didn't seem out of reach - just a bit hard. I've only got a few hours each evening where I can work on the problems (and I have to split that time with playing go
), so I think solving two problems is fairly reasonable.
On problem B:
On problem C:
On problem B: