## Search found 106 matches

Wed Feb 28, 2007 4:24 am
Forum: Algorithms
Topic: USACO 2.1 Healthy Holstein
Replies: 2
Views: 3136

### I solved it.

Finally, I solved it!
Numbers of vitamin are maximum 15, therefore it can be solved by
2^15 complete search.
I used "looping through find all the subsets of a set", and it works very fast. Thx!
Mon Feb 26, 2007 6:37 pm
Forum: Algorithms
Topic: USACO 2.1 Healthy Holstein
Replies: 2
Views: 3136

### USACO 2.1 Healthy Holstein

I try to solve this problem using backtracking. However, test case 8 caused TLE ( 2sec. ) . Is there other solution? Or I must improve my backtracking algorithm? If you already solved it, plz help me. [Problem Statement] Farmer John prides himself on having the healthiest dairy cows in the world. He...
Wed Feb 14, 2007 9:52 am
Forum: Volume 100 (10000-10099)
Topic: 10079 - Pizza Cutting
Replies: 44
Views: 10649

### 10079 Pizza Cutting - I want to know the proof.

It's a very easy problem, and I solved it within 10 min.
In my intuition, I can see that answer makes following arithmetic progression
a(n) = 1 + (n(n+1))/2;
However, I want to know why pizza cutting makes this expression.
Anyone tell me the proof of this expression?
Wed Feb 14, 2007 4:19 am
Forum: Volume 4 (400-499)
Topic: 483 - Word Scramble
Replies: 122
Views: 21649
You must remove only last blanks, and other blanks must same as input string.

For example,

Input ( _ means blank )

Code: Select all

``````__I___love_you.___
``````
Presentation Error

Code: Select all

``````__I___evol_.uoy___
``````
Accepted

Code: Select all

``````__I___evol_.uoy
``````
Good luck.
Wed Feb 14, 2007 4:12 am
Forum: Volume 4 (400-499)
Topic: 483 - Word Scramble
Replies: 122
Views: 21649
You must remove only last blanks, and other blanks must same as input string.

For example,

Input ( _ means blank )

Code: Select all

``````__I___love_you.___
``````
Presentation Error

Code: Select all

``````__I___evol_.uoy___
``````
Accepted

Code: Select all

``````__I___evol_.uoy
``````
Good luck.
Tue Feb 13, 2007 7:51 am
Forum: Volume 5 (500-599)
Topic: 539 - The Settlers of Catan
Replies: 22
Views: 8251

It's an undirectional graph. threrfore, 0 -> 1 is same as 1 -> 0.
Good luck.
Wed Jan 31, 2007 4:05 pm
Forum: Volume 5 (500-599)
Topic: 524 - Prime Ring Problem
Replies: 74
Views: 20063
I don't know the other method to solve this problem. However, it is obvious that permutation method is too slow to find all solutions.
When n = 16, almost 16! times ( 209,227,898,888,000 times ) needs to calculate to search all cases.
Fri Jan 26, 2007 10:11 am
Forum: C++
Topic: 2D string array for STL sort
Replies: 3
Views: 2804

### 2D string array for STL sort

I'm so awkward using in STL. When I implemented 2D array sort in C, I used bubble sort. But I want to know how can I sort 2D array in STL sort(). For example, // before sort string data[3][2] = { {"cab","hello"}, {"cba","world"}, {"abc","haha"}}; // After sort string data[3][2] = { {"abc","haha"}, {...
Fri Jan 26, 2007 3:50 am
Forum: Volume 103 (10300-10399)
Topic: 10315 - Poker Hands
Replies: 63
Views: 28403
My solution still received WA.. Thx, Jan. My program passed all of your test case, but it cannot pass the OJ's test. I found one critical input, so I modified my code. But I recieved WA.. My critical Input 4C 4C 8C 7C 5C 3D 3D 8D 7D 6D In this test case, both hands are flush. According to the proble...
Thu Jan 25, 2007 12:14 pm
Forum: Volume 103 (10300-10399)
Topic: 10315 - Poker Hands
Replies: 63
Views: 28403
It's really tricky... I can't solve this problem though all of Jan's test case passed... If anyone have critical test case for this problem, plz tell me about it. And I have another question. Full House: 3 cards of the same value, with the remaining 2 cards forming a pair. Ranked by the value of the...
Sat Dec 30, 2006 10:14 pm
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 33767

### 11151 - Longest Palindrome

hmm.. It's so tricky. It just looks like an easy problem, but I received WA repeatedly... Is there any critical input?
Thu Dec 21, 2006 10:07 am
Forum: Off topic (General chit-chat)
Topic: Super Fast Programmer
Replies: 18
Views: 35107
64351 's current name is Seongwook Ha @ i-Logic He is a tutor of private algorithm & problem solving academy what was named i-Logic. I guess he AC by cheating ( It means he copied others source code ) for his public relations (P.R.) Of course, he also solved some problems by himself, but it is the f...
Thu Dec 21, 2006 6:30 am
Forum: Other words
Topic: North Korean Team advance to World Final in Japan?
Replies: 0
Views: 1737

### North Korean Team advance to World Final in Japan?

I'm so curious about this year's World Final teams. Especially, I noticed that some of north korean teams joined in this year's regional contest in Xian site, Asia (China). http://icpc.baylor.edu/icpc/regionals/ViewRegionalStandings.asp?ContestID=790 Two schools are represented for North Korea. KimC...
Wed Dec 06, 2006 2:56 am
Forum: Volume 9 (900-999)
Topic: 900 - Brick Wall Patterns
Replies: 16
Views: 9377
Thx, Rio.

I changed the type of "int a" to "long long a", then I accepted.
Maybe my loop statement caused an overflow, and it makes infinite loop.
Thx!

ps ) I changed this thread title. ^^;
Wed Dec 06, 2006 2:11 am
Forum: Volume 9 (900-999)
Topic: 900 - Brick Wall Patterns
Replies: 16
Views: 9377

### 900 - Brick Wall Patterns

It's a very easy problem. However, I received TLE from judge.
I don't know why my solution received TLE. It works well my VC++ and
g++ compiler.

Anyone tell me why my solution received TLE. Thx.

Code: Select all

``````
Remove my accepted code

``````