Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Choptsticks with dynamic programming

Name: Anonymous 2013-04-21 18:50

I realize I suck at algorithms. I have this assignment that I can't get the picture in my head. I want to comprehend the chopsticks algorithm from UVA.
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1212

I have the solution already in spanish and it works, already made the test cases and all. The problem is that I don't quite understand what to do in case of more persons and reducing the badness at minimum.

Name: Anonymous 2013-04-21 18:58

The service is not available. Please try again later.
I'll try look at the page later, maybe tomorrow

Name: Anonymous 2013-04-21 19:25

>>1
dynamic programming
Is that liek dynamic typing?

Name: Anonymous 2013-04-21 19:30

To do dynamic programming you need a http://en.wikipedia.org/wiki/Dynamic_programming_language

I recommend PHP. It is nice, easy and highly dynamic.

Name: Anonymous 2013-04-21 19:56

>>3
no
>>4
I think you misundertood me. What I meant with dynamic programming wasn't to solve something with a dynamic programming language.
Dynamic programming in algorithms, more or less, is a method of programming that breaks the recursivity by including Memorization.

http://en.wikipedia.org/wiki/Dynamic_programming

Anyways, if someone has a way of explaining to me that particular problem i'll be awesome.
The problem is named:
10271 - Chopsticks

Thanks /prog/

Name: Anonymous 2013-04-21 20:11

You are now the little girl.

You’ve never been comfortable dealing with boys. Luckily for you, you managed to find yourself a loving senpai who understands you. The two of you develop a romantic relationship and she helped you to discover ways for two girls to enjoy each other’s company.

Your parents are concerned about the development and decide to introduce you to suitable guys. You are now at another matchmaking ceremony flanked by your parents and with a young man opposite to you. You feel uncomfortable being on display and keep your eyes fixed on the floor.

What do you do?

Name: Anonymous 2013-04-21 20:15

>>5
Dynamic Programming -> BASIC -> Microcomputer -> Issac Asimov -> World War II -> Adolf Hitler

Name: Anonymous 2013-04-21 21:09

>>7
Issac Asimov
You cannot visit Hitler, without visiting an ashkenazi.

Name: Anonymous 2013-04-21 21:24

>>8
Dynamic Programming -> String (computer science) -> Computer Programming -> Grace Hopper -> United States Navy -> United States Navy in World War II -> World War II -> Adolf Hitler

Name: Anonymous 2013-04-21 21:36

>>9
suboptimal path.

Name: Anonymous 2013-04-21 22:49

>>10

Dynamic Programing -> Edit -> Save Page -> Adolf Hitler

Better?

Name: Anonymous 2013-04-21 23:03

Dynamic Programming -> Economics -> Hyperinflation -> Hyperinflation in the Weimar Republic -> Adolf Hitler

Name: Anonymous 2013-04-22 0:39

>>4
i want you dead

Name: Anonymous 2013-04-22 1:09

>>13
I want a pony

Name: Anonymous 2013-04-22 1:16

>>10
But no Jews.

Name: Anonymous 2013-04-22 1:25

Dynamic Programming -> Exponential growth -> Finance -> Federal  Reserve System -> United States dollar -> World War II -> The Holocaust -> Jews

Only seven degrees of separation between dynamic programming and JEWS (note: seven is a sacred number in Jewish mythology). Can there be any question that >>1 is a kike?

Name: Anonymous 2013-04-22 2:42

1. Did you know that non-Jewish Israelis cannot buy or lease land in Israel? A Jew from any country in the world is guaranteed citizenship in Israel, while the Palestinians who have been there for centuries are oppressed and persecuted.

2. Did you know that instead of sewing an insignia on clothing to distinguish race (like the Germans did to the Jews before WW2), Palestinian license plates in Israel are color coded to distinguish Jews from non-Jews?

3. Did you know that East Jerusalem, the West Bank, Gaza, and the Golan Heights are all considered by the entire world community, including the United States and the United Nations, to be occupied territory and NOT part of the State of Israel?

4. Did you know that Israel allots 85% of the water resources for Jews, and the remaining 15% is divided among all Palestinians in the territories? For example in Hebron, 85% of the water is set aside for about 400 Jewish settlers, while the remaining 15% is distributed among Hebron's 120, 000 Palestinians?

5. Did you know that the United States awards Israel $5 billion in aid each year from American tax dollars?

6. Did you know that US aid to Israel ($1.8 billion annually in military aid alone) exceeds the aid the US grants to the entire African continent? This aid is used both to buy American weaponry and to buy arms made in Israel.
[ - ]     Anonymous 09/06/11(Tue)23:03:00 No.352146358 Hide ▲ ▼ [ ! ]
7. Did you know that Israel is awaiting an additional $4 billion worth of American military hardware, including new F-16s and Apache and Blackhawk helicopters. As Israel's main ally and supporter internationally, the United States is committed to maintaining the Jewish state's "qualitative edge" in weapons over its neighbours.

8. Did you know that the U.S. administration has notified Congress on numerous occasions that Israel has violated the rules on how US-supplied weapons are used? (In 1978, 1979 and 1982 during fighting in Lebanon, and once after Israel's bombing of an Iraqi nuclear reactor in 1981.)

9. Did you know that Israel is the only country in the Middle East that refuses to sign the nuclear non-proliferation treaty and bars international inspections from its sites?

10. Did you know that high-ranking military officers in the Israeli Defence Forces have admitted publicly that unarmed prisoners of war have been summarily executed by the Israeli forces?

11. Did you know that Israel blew up an American diplomatic facility in Egypt and attacked a US warship in international waters (the USS Liberty), killing 33 and wounding 177 American sailors and the US did nothing about it? (Imagine if an Islamic country like Iraq did this!)

12. Did you know that Israel stands in defiance of 69 United Nations Security Council Resolutions?

[ - ]     Anonymous 09/06/11(Tue)23:03:58 No.352146570 Hide ▲ ▼ [ ! ]
13. Did you know that Israel is explicitly dedicated to the policy of maintaining a distinct Jewish character?

14. Did you know that Israel's current Prime Minister, Ariel Sharon, was found by an Israeli court to be "personally and directly responsible" for the Sabra and Shatilla massacre in Lebanon where more than a thousand innocent Palestinian men, women, and children were axed to death or lined up and shot in cold blood?

15. Did you know that on May 20, 1990, a group of unarmed Palestinian labourers were lined up and murdered by an Israeli solider as they sat waiting for transportation back to Gaza? The terrified labourers who gathered in an area of southern Israel known as Rishon Lezion (known to Palestinians by its Arabic name Oyon Qara) handed their ID cards to the Israeli soldier. The soldiers ordered the distressed labourers to kneel down and face the ground and unexpectedly showered them with a barrage of bullets, killing seven and wounding many others. Needless to say, the soldier was not charged with any crime.

16. Did you know that until as recently as 1988, Israelis were permitted to run "Jews Only" job ads?

17. Did you know that the Israeli Foreign Ministry pays six US public relations firms to promote a "positive image" of Israel to the American public?

18. Did you know that Sharon's coalition government includes a party--Molodet--which advocates ethnic cleansing by openly calling for the forced expulsion of all Palestinians from the occupied territories?

[ - ]     Anonymous 09/06/11(Tue)23:04:30 No.352146678 Hide ▲ ▼ [ ! ]
19. Did you know that recently-declassified documents indicate that David Ben-Gurion approved of the forced expulsion of Arabs from all Palestinian territory in 1948?

20. Did you know that the former chief rabbi of Israel, Rabbi Ovadia Yossef, who is also a founder and spiritual leader of the religious Shas party (Israel's third largest political party) openly advocates a 'Final Solution' to annihilate the Palestinians? Speaking at the widely broadcast sermon marking the last Passover, he declared of the Palestinians: "The Lord shall return their deeds on their own heads, waste their seed and exterminate them, devastate them and vanish them from this world. It is forbidden to be merciful to them. You must send missiles to them and annihilate them. They are evil and damnable."

21. Did you know that Palestinian refugees make up the largest portion of the refugee population in the world?

22. Did you know that Palestinian Christians are considered the "living stones" of Christianity because they are the direct descendants of the disciples of Jesus Christ? And the Palestinian Christians stand united with their Muslim brethren in the struggle against the Israeli occupation.

23. Did you know that despite a ban on torture by Israel's High Court of Justice, torture has continued unabated by Shin Bet interrogators on Palestinian prisoners?

24. Did you know that despite every Israeli attempt to disrupt Palestinian education, Palestinians have the highest ratio of PhDs per capita in the world?

[ - ]     Anonymous 09/06/11(Tue)23:05:03 No.352146800 Hide ▲ ▼ [ ! ]
25. Did you know that the right of self-determination is guaranteed to every human being under the Universal Declaration of Human Rights [December, 1948], yet Palestinians were/are expected to negotiate for this right under the Oslo Accords?

26. Did you know that despite what is widely perpetuated and written in the history books that the Arabs attacked Israel in the 1967 war, it was Israel who attacked the Arab countries first, capturing Jerusalem and the West Bank, and called the attack a pre-emptive strike?

27. Did you know that, as an occupying power, Israel has a particular responsibility under the Geneva Conventions to protect Palestinian civilians?

28. Did you know that, despite Ariel Sharon's public call for a unilateral ceasefire, Israeli soldiers have not stopped shooting, killing or bulldozing Palestinian homes? The most recent example of this is the murder of three innocent women who were shot by an Israeli tank as they sat in their tent!

29. Did you know that the Zionists have been trying to destroy Masjid al-Aqsa and the Dome of the Rock for the last 50 years by digging underground tunnels beneath the sites to weaken its foundation causing it to collapse?

30. Nelson Mandela called the Israeli government an apartheid regime, just like South Africa used to be.

Name: Anonymous 2013-04-22 2:59

>>17
CHALLENGE ME THEN YA FUCKIN RETOID: http://dis.4chan.org/read/prog/1366477725

Name: Anonymous 2013-04-22 3:12

Your life sucks. You are all fat otaku nerds that are stuck in a room with nobody else than you, because nobody would like something so disgusting as you.

But, don't panic. You don't need to suffer anymore. Just die... release yourself from your pain... embrace the death... You know, if you die, you go to gensokyo, where all your dreams comes true.

Name: Anonymous 2013-04-22 3:20

>>16
Dynamic Programming -> Scheme (programming language) -> Gerald Jay Sussman -> Category:Jewish American scientists -> Felix Bloch -> Jews

Name: Anonymous 2013-04-22 3:47

Dynamic Programming -> Context-free grammar -> Noam Chomsky -> Antisemitism -> Jews

>>20
It's unfair to use categories.

Name: Anonymous 2013-04-22 6:29

>>16
Only seven degrees of separation between any two unrelated subjects
So why don't we have Strong AI already? N^7 doesn't sound like a big number.

Name: Anonymous 2013-04-22 7:05

>>17
Did you know that the United States awards Israel $5 billion in aid each year from American tax dollars?
You're just jealous, that your Podunk doesn't get any state support, while foreign nationals receive billions.

Name: Anonymous 2013-04-22 10:25

>>5
It's memoization you dumb fuck.

Also, do you happen to study in a Latin American university? Because those programming contests are popular here too.

Name: Anonymous 2013-04-22 12:46

>>24
latinamerican university campus

http://tinyurl.com/busc5cd

Name: Anonymous 2013-04-22 14:54

>>25
blissfully unaware

Name: Anonymous 2013-04-22 15:56

Gone for a day and the thread just went bananas.
>>24
Didn't know it was called that way because, as you can see, english is not my native language. Also i'm a dumb fuck.

Yes I study at a latin american university and for some reason this kind of problems aren't teached, they expect you to figure it out for yourself. No wonder ACM is strong in here, but i'm no super saiyan, I plain suck at Algorithms.

Name: Anonymous 2013-04-22 16:36

>>1
index.php
PHP is defective by design. There is simply no apology for PHP flaws:
1. Inconsistent lexical scope, where assignment acts as declaration and all variables have function scope, serving as major source of PHP bugs and impeding functional programming, because in PHP anonymous functions require awfully verbose constructions, like `function($y) use ($x) {`. Compared to Scheme/Racket, which uses `let` for everything, PHP's global scope is completely separate entity and requires explicit use of `global` keyword to access variables. PHP has no package system, so global namespace becomes unmanageably cluttered. Moreover, referencing nonexistent variable isn't even an error, so any typo produces untraceable bug. Finally, PHP allows non-string variable names: $a=array();$$a='broken'; print ${array()};
2. Inconsistent standard library: for example, shuffle(123) would return false, instead of logging error and halting execution, before more damage is done; same for accessing array beyond bounds, which is even worser than C/C++, where such access at least produces segmentation fault. Despite null also being valid JSON object, json_decode returns null on error, welcoming bugs if user forgets json_last_error. Functions sizeof, count `print` and `echo` duplicate functionality, while `print` for some reason always returns 1. Moreover, PHP arrays are implemented as hash tables, so there is no way to get their real size or iterate by indices at all. PHP standard library basically indulges hard to trace bugs, exploits and backdoors, because almost any PHP feature is fragile and poses security danger. Inconsistent function naming: underscores (isset vs is_null), abbreviations (call_user_func vs create_function), uncertain parameter order (in_array($needle, $haystack) vs strpos($haystack, $needle)), redundant aliases (disk_free_space vs diskfreespace, strcmp vs ==), misleading names (addslashes and stripslashes, which deal with backslashes).
3. Broken and non-portable type system: PHP stores integers in a platform-dependent format, usually 64-bit or 32-bit signed integer, equivalent to the C-language long type. Even worse: big integers are represented as floating point numbers, so 9999999999999999999==10000000000000000000. Confusing automatic type coercion, where FALSE=="", FALSE==0, array()==FALSE, array()!=0, "1e3"=="1000", "0x10"=="16" "a"+"d"==0, 123=="123broken", "4.2"=="4.20", "6"==" 6", "x"==0", NULL<-1, NULL==0. Be prepared to a lot of instant bugs, like if(strpos($h,$n)) {...}, because 0 gets converted to FALSE, behind your back. Due to broken `<` sorting is nondeterministic.
4. Inconsistent garbage collection, performed only when you tell PHP to do it or passing specific junctions. In some cases memory lost until program halts, which unnoticeable with small one shot page generation scripts, but poses a major handicap for general purpose programming using PHP, when code must run for days.
5. Discrepancy between literals and variables, growing from variables being objects themselves: given $a="foo", var_dump($a instanceof stdClass) works, but var_dump("foo" instanceof stdClass) produces error; same with array literals: $a[0] works, but array(1,2,3)[0] fails. Array assignment always involves deep copying, which is confusing and bad for performance. Function may be called via variable, containing function name, leading to badly designed and insecure code, welcoming exploits, especially when function name comes from use input.
6. Fugly syntax: every PHP variable requires `$` prefix, which looks even scarier when combined with `&`, required to pass objects by reference, so be prepared for quirky perl-ugly code, like &$o[i++] and !--$$i. The syntax has 1375 conflicts and 6 unused terminals, reflecting that implementors had no understanding of LALR(1) parser generators or robust language design in general, because with that many conflicts, the chances are slime that the parser is actually doing 100% of what was intended: for example "a".2 produces an error, but "a"."2", "a" . 2 and 1 . 2 parse as string concatenation, while 1.2 and .2 parse as numbers, worser 0x0+2==4, but 0x0+ 2==2 so meaning of operator depends on spaces around it.  Usual `{` and `}` braces can be interchanged with `:` and `endif;`, which is aggravated by the fact that PHP syntax treats { and ${ as separate tokens (T_CURLY_OPEN and T_DOLLAR_OPEN_CURLY_BRACES), making PHP syntax bigger and even less regular: PHP has around 70 keywords, including echo, eval and exit, which in well designed languages implemented as functions.
7. No multithreading support possible, because PHP is full of global and implicit state. mbstring uses a global character set. func_get_arg and friends look like regular functions, but operate on the currently-executing function. Error handling have global defaults. register_tick_function sets a global function to run every tick.
8. When faced with criticism, all PHP apologists spit generic arguments, starting with banal ad-hominem, which speak for themselves: "all languages are turing complete", "languages are just tools", "no language is perfect", "good developers can write good code in any language", "PHP was never intended to solve problem X", "PHP isn't the problem, bad programmers are", "products X was built using PHP, so PHP is good enough", "there are two kinds of languages: the ones complained about and the ones nobody uses", "PHP is free, hosting is available, PHP programmers are cheap", "clients don't care what language is used", "PHP has great community, we are like family", "if you do X then problem Y would be less noticeable", and a myriad of variations.
9. PHP is Jewish language, developed by Israeli company with unclear agenda. It is entirely possible that PHP is just a trojan horse and real goal was to produce exploit-happy environment, which Israeli intelligence agencies could leverage to advance interests of Israel. Being originally a collection of CGI scripts designed for building a 'personal home page', PHP indulges messy, unmaintainable code: spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML, replicated in slightly-varying form in dozens of places.

Name: Anonymous 2013-04-22 16:49

Also, Hacker Jews are purely evil and defend PHP:
https://news.ycombinator.com/item?id=4177516
$foo[] = $bar is a good thing.

hope they are trolling.

Name: Anonymous 2013-04-22 17:00

>>29
Also, love his
Sometimes you don't care if a function succeeds; like with the unlink() function which will raise an error if the file you're trying to delete doesn't exist.
because unlinking non-existing file points to logical inconsistency: file probably wasn't created (monkey-coder forgot to call init_handle()) or was deleted several times (i.e. same code was accidentally called few times in some destructor or garbage collector).

Name: Anonymous 2013-04-22 20:02



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:09



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:15



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:19



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:24



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:29



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:34



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:42



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:47



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:53



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 21:05



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 21:11



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Don't change these.
Name: Email:
Entire Thread Thread List