• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 10:39
CET 16:39
KST 00:39
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners11Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation10Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
RSL Season 3 - RO16 Groups A & B Preview Mech is the composition that needs teleportation t [TLMC] Fall/Winter 2025 Ladder Map Rotation Weekly Cups (Nov 3-9): Clem Conquers in Canada Craziest Micro Moments Of All Time?
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament RSL Revival: Season 3 Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? BW General Discussion Brood War web app to calculate unit interactions [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
Current Meta Simple Questions, Simple Answers PvZ map balance How to stay on top of macro?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 Beyond All Reason Should offensive tower rushing be viable in RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1704 users

[SC2B Key Contest]Supply Depot Forts

Blogs > yh8c4
Post a Reply
yh8c4
Profile Blog Joined July 2009
108 Posts
Last Edited: 2010-04-13 12:51:57
April 13 2010 09:40 GMT
#1
CONTEST IS OVER! WINNER: forti

I have a unused friend invite key, which you are able to win by being the first to answer the following question:

First we need some definitions:

A supply depot fort is a square center area surrounded by an arbitrary number of supply depot rings. A ring either completely surrounds the center area or another ring.

Example 1 (just treat submerged depots as if there were no depots at that location)

Let's say your fort must be made of exactly eight supply depots, then the only valid configuration is this one:

[image loading]

---

Example 2:
If you use 32 depots, there are two valid configurations:

[image loading]

[image loading]

---

We define s to be the number of used supply depots and nC(s) to be the number of valid supply depot fort configurations made of s supply depots (e.g. nC(32) = 2).

Furthermore let's say you have exactly one million supply depots at your disposal and you can choose any amount x of those supply depots to build a fort.

We define f(n) to be the number of different x for which nC(x) = n.

Example:
+ Show Spoiler +

'f(13) = 123' means: there are 123 different values for x, so that for each of those x there are exactly 13 distinct, valid supply depot fort configurations.

f(13) is not necessarily 123, I just made that up, but to check if you're on the right way, here is a hint:

+ Show Spoiler +

Calculate f(15). edit: f(15) = 832
Multiply the result with 123456.
Go here
Enter this text:

GxD4AhayOeDnC8oY7wKGVhRJ3BTPYiTxfomXV4SLiWTpSHmxa3C7+/v3ONNbTbeRZ7ZEhG0xHMV6R5aU0CL1gA==

Use what you calculated as password and decrypt.
Decrypted text should be 'correct'




Here comes the questions worth the beta key:

What is the sum of f(1)+ f(2) + ... + f(9) + f(10)?

Answer
+ Show Spoiler +

209566

forti's (annotated) c++ solution

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//standard C libraries

int array[1000005];
//array that stores the number of solutions using 1-1000000 supply depots

int main()
{
memset(array,0,sizeof(array));
//setting everything to 0 initially

for(int i=1;i<=249999;i++)
//the width of center blank square AKA, i am assuming an
//i x i square. 249999 is the maximum width possible with
//1000000 supply depots used (1000000-4)/4
{
int sum=0;
//the number of boxes used at the moment

//the following section of the code basically adds
//"supply depot layers" to the center square 1 by 1
for(int j=i;;j+=2)
{
int k=j*4+4;
sum+=k;
if(sum>1000000) break;
array[sum]++;
}
}
int temp,c;
c=0;

//the final part computes f(1) to f(10) from what was
// found previously
for(temp=1;temp<=10;temp++)
{
for(int i=1;i<=1000000;i++)
{
if(array[i]==temp)c++;
}
}
printf("%d\n",c);
system("PAUSE");
}



---

Some details:

- My bnet account is on Europe and I don't know if the person using the friend key will also have to use a european account. Maybe someone can clarify that for me.

- I not only want the correct answer, I also want a little explanation why your answer is correct (source code, or just a short text describing the way you arrived at the solution)

- You can either post your entry in this blog or send me a pm.

- You are not limited to one guess, but please be reasonable and don't just bomb me with all integers from 1-100000 or something

- I will check this thread and pms periodically and let you know when I checked a possible solution

- The problem is kinda difficult, but I'm rather mediocre at maths and I was able to solve it after (quite) some time so I'm confident someone will find the solution.

Good luck!

edit1: just some definition clarifications
edit2: we have a winner. edited in the solution

***
CaucasianAsian
Profile Blog Joined September 2005
Korea (South)11584 Posts
Last Edited: 2010-04-13 09:50:01
April 13 2010 09:49 GMT
#2
why'd you close your other blog? meaning what was the answer to the other question?
Calendar@ Fish Server: `iOps]..Stark
Moletrap
Profile Blog Joined July 2007
United States1297 Posts
April 13 2010 10:05 GMT
#3
Awesome contest!
aka Moletrap
forti
Profile Blog Joined April 2010
Singapore9 Posts
April 13 2010 10:14 GMT
#4
+ Show Spoiler +

my answer is 209566
using:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int array[1000005];
int main()
{
memset(array,0,sizeof(array));
for(int i=1;i<=249999;i++)//center square
{
int sum=0;
for(int j=i;;j+=2)
{
int k=j*4+4;
sum+=k;
if(sum>1000000) break;
array[sum]++;
}
}
int temp,c;
c=0;
for(temp=1;temp<=10;temp++)
{
for(int i=1;i<=1000000;i++)
{
if(array[i]==temp)c++;
}
}
printf("%d\n",c);
system("PAUSE");
}

yh8c4
Profile Blog Joined July 2009
108 Posts
Last Edited: 2010-04-13 10:54:56
April 13 2010 10:41 GMT
#5
the contest is already over, forti is the new owner of the beta key.

For anyone still interested in solving the question:

The described problem is a obfuscated version of this, so if you open an account there you can check your solution there (or you could just peek into forti's spoiler)

Seems like i kinda underestimated the possibility to brute force, but when I worked on that problem, my main difficulties were understanding and abstracting the problem and coming up with an algorithm. forti was much faster on that part, and thus is a worthy winner imo. Have fun playing sc2.

Btw, the first problem i posted i didn't paraphrase at all (just screenshotted this), and didn't realize that because of that the solution was just one google search away, and that's why the first contest was cancelled.

Anyways, I'm out of beta keys, so I guess this can also be closed now
tyCe
Profile Joined March 2010
Australia2542 Posts
April 13 2010 10:46 GMT
#6
Damn it! I chose dinner over this and I paid the price.
Betrayed by EG.BuK
tarpman
Profile Joined February 2009
Canada719 Posts
April 13 2010 10:55 GMT
#7
I spent some time thinking about an elegant mathematical solution. Then I put that aside and wrote a bruteforce version very similar to forti's in Python... but it was still running when forti won damn Python's slowness!

forti, gg! nice first post!
Saving the world, one kilobyte at a time.
Zona
Profile Blog Joined May 2007
40426 Posts
April 13 2010 10:59 GMT
#8
heh, I was watching KT vs STX and only saw this after the second set - like tarpman, had something in python going.

But then again I don't really crave a beta key close to as much as others here, so it's fine.
"If you try responding to those absurd posts every day, you become more damaged. So I pay no attention to them at all." Jung Myung Hoon (aka Fantasy), as translated by Kimoleon
yh8c4
Profile Blog Joined July 2009
108 Posts
April 13 2010 11:07 GMT
#9
i'm quite surprised there are still so many people around here wanting a beta key. I had this key sitting in my inbox for quite some time, but for some reason i thought there wasn't much demand anymore
madnessman
Profile Blog Joined May 2009
United States1581 Posts
April 13 2010 11:17 GMT
#10
On April 13 2010 20:07 yh8c4 wrote:
i'm quite surprised there are still so many people around here wanting a beta key. I had this key sitting in my inbox for quite some time, but for some reason i thought there wasn't much demand anymore


You should probably donate it to one of those poor starcraft players who didn't get a key *cough madnessman cough*....
yh8c4
Profile Blog Joined July 2009
108 Posts
Last Edited: 2010-04-13 11:19:31
April 13 2010 11:18 GMT
#11
On April 13 2010 20:07 yh8c4 wrote:
i'm quite surprised there are still so many people around here wanting a beta key. I had this key sitting in my inbox for quite some time, but for some reason i thought there wasn't much demand anymore


Perguvious
Profile Blog Joined November 2008
United States1783 Posts
April 13 2010 11:53 GMT
#12
On April 13 2010 19:14 forti wrote:
+ Show Spoiler +

my answer is 209566
using:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int array[1000005];
int main()
{
memset(array,0,sizeof(array));
for(int i=1;i<=249999;i++)//center square
{
int sum=0;
for(int j=i;;j+=2)
{
int k=j*4+4;
sum+=k;
if(sum>1000000) break;
array[sum]++;
}
}
int temp,c;
c=0;
for(temp=1;temp<=10;temp++)
{
for(int i=1;i<=1000000;i++)
{
if(array[i]==temp)c++;
}
}
printf("%d\n",c);
system("PAUSE");
}


*sigh* I just didn't understand any of that
krndandaman
Profile Joined August 2009
Mozambique16569 Posts
April 13 2010 12:06 GMT
#13
--- Nuked ---
josemb40
Profile Blog Joined March 2009
Peru611 Posts
April 13 2010 14:19 GMT
#14
congrats
wiiiiiiiiiiiiiiiii
GreEny K
Profile Joined February 2008
Germany7312 Posts
April 13 2010 15:07 GMT
#15
On April 13 2010 21:06 krndandaman wrote:
i've entered around 10 competitions for a sc2 beta key rofl


Ditto, maybe even more... Everyone's getting keys except me!! I even know people who won more than one some ever 3 but I still don't have one
Why would you ever choose failure, when success is an option.
krndandaman
Profile Joined August 2009
Mozambique16569 Posts
April 13 2010 15:11 GMT
#16
--- Nuked ---
ReketSomething
Profile Blog Joined November 2008
United States6012 Posts
April 13 2010 18:16 GMT
#17
One of my favorite contests so far ^^
Jaedong :3
jimminy_kriket
Profile Blog Joined February 2007
Canada5520 Posts
April 13 2010 18:47 GMT
#18
pretty neat
life of lively to live to life of full life thx to shield battery
3FFA
Profile Blog Joined February 2010
United States3931 Posts
Last Edited: 2010-04-13 21:07:41
April 13 2010 21:06 GMT
#19
wtf. This seems like a contest at school. I don't get to know about it until its already over/too late.

edit: I mean, this happened when I was asleep.... well I guess I've taken "you snooze you loose" to a new level lol.
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
Kenpachi
Profile Blog Joined August 2009
United States9908 Posts
April 13 2010 22:39 GMT
#20
On April 14 2010 00:11 krndandaman wrote:
Show nested quote +
On April 14 2010 00:07 GreEny K wrote:
On April 13 2010 21:06 krndandaman wrote:
i've entered around 10 competitions for a sc2 beta key rofl


Ditto, maybe even more... Everyone's getting keys except me!! I even know people who won more than one some ever 3 but I still don't have one


facebook's about to release a few more keys in 2hours on the starcraft fan page.

it's a F5 refreshing fest.

join the club. Were all Beta key contest failures
Nada's body is South Korea's greatest weapon.
Please log in or register to reply.
Live Events Refresh
WardiTV Korean Royale
12:00
Group Stage - Group A, Day 2
WardiTV917
TKL 261
Rex123
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 261
Rex 123
SteadfastSC 65
MindelVK 24
BRAT_OK 6
StarCraft: Brood War
Britney 42622
Calm 3945
Rain 3396
Horang2 1122
Bisu 788
firebathero 471
Soma 241
Flash 235
Snow 190
Zeus 164
[ Show more ]
BeSt 111
Hyun 80
hero 77
Soulkey 76
Rush 69
Killer 54
Sea.KH 48
Mind 47
sas.Sziky 46
Barracks 29
TY 18
Terrorterran 14
Free 13
Shine 13
Movie 12
Bale 10
JulyZerg 5
Dota 2
singsing4680
qojqva2717
Dendi1256
Counter-Strike
byalli457
oskar104
Super Smash Bros
Mew2King97
Other Games
B2W.Neo1298
hiko520
crisheroes433
Lowko321
RotterdaM238
Happy202
Sick140
Liquid`VortiX112
QueenE54
febbydoto11
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• poizon28 3
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• ZZZeroYoutube
• STPLYoutube
• HerbMon 0
• BSLYoutube
Dota 2
• C_a_k_e 3250
League of Legends
• Nemesis5256
• TFBlade926
• Stunt664
Other Games
• WagamamaTV346
Upcoming Events
CranKy Ducklings
18h 21m
RSL Revival
18h 21m
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
20h 21m
Cure vs Reynor
Classic vs herO
IPSL
1d 1h
ZZZero vs rasowy
Napoleon vs KameZerg
OSC
1d 3h
BSL 21
1d 4h
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
1d 18h
RSL Revival
1d 18h
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
1d 20h
WardiTV Korean Royale
1d 20h
[ Show More ]
BSL 21
2 days
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
2 days
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
2 days
Wardi Open
2 days
Monday Night Weeklies
3 days
WardiTV Korean Royale
3 days
BSL: GosuLeague
4 days
The PondCast
4 days
Replay Cast
5 days
RSL Revival
5 days
BSL: GosuLeague
6 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-07
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
RSL Revival: Season 3
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
META Madness #9
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.