Here are comments about some of my solved problems in Uva Online Judge (uva.onlinejudge.org) site. No solution is provided here. Just look around if you can find a clue.

Problem ID | Problem Name | Comments |

371 | ackerman function | another 3n+1 problem but need to be careful for case 1 2, output should be 3 long long or unsigned long will be just fine |

739 | Soundex Indexing | string problem, need to be strictly careful about output |

913 | JoanaAndOddNumber | mathmatical problem, the equation is all that is needed to be solved, you can find the last three number from any given odd number in a line. important lesson learned use long long instead of __int64 |

10079 | Pizza Cutting | mathmatical problem, guess in a circle how many pieces there will be if every new line crosses old lines and the pizza becomes divided into many pieces. Only a equation and tada! |

340 | Master-Mind | took time to understand the question. Take your time to understand the question careflly. See the output. Easy. Just need to find the strong and weak match between the secret code and all other guess case. |

386 | Perfect Cubes | first keep in an array all the cubes upto 200. then use brute loops to find the match |

408 | Uniform Generator | Use of flag. Need to test if the generated random numbers are all number one less mode |

444 | EncoderAndDecoder | String manipulation. Be careful about the punctuation characters. |

484 | TheDepartmentofRedundancyDepartment | String calculation. Two for loops brute force. |

488 | TriangleWave | Output related. Take care for printing new line and blank line between input/testcase |

573 | Snail | Whatever the fatigue level the snake always slids. And there is night and day portion in each day. |

579 | ClockHands | There is a great description in this problem. But what you need to do is just find the angle between the hour hand and minute hand. Remember that when minute hand moves the hour hand also moves slightly. |

621 | SecretResearch | Important lesson is that any string is terminated by ”. And keeping this in mind this is not that tough. |

694 | TheCollatzSequence | Remember that neither of A or L is larger than 2147483647 |

10035 | PrimaryArithmatic | First thing to notice that both of the number may not be equal. So need to equal them padding 0s to do make the carry operation easier. |

10071 | HighSchoolPhysics | Derive the euation or try to guess from the answer. |

10101 | BanglaNumber | Easy to imagine the number in two part then work with the separate part to determine if it is kuti lakh etc… |

10170 | HotelWithInfiniteRoom | Do it the easy way or number theory or quadratic equation… Note that after each day one more member adds |

10189 | Minesweeper | each cell has 8 adjacent cells and the logic Is simple. Be careful about printing new line and spaces. There is a mistake in judge. New line after test case. Which is not mentioned in the question. |

10190 | Divide, But not quite conquer | Keep the sequence in an array until >=1. And check that array according to the mentioned algorithm. Notice when m & n <2 then they are boring! |

10281 | Average Speed | Take input as string. |

10300 | EcologicalPremiur | Just multiply and sum. Don’t get thundered by large input! |

10591 | HappyNumber | Guess if the same sequence doesn’t come within 10000 step then we may say that the number is Unhappy!! |

10924 | PrimeWords | Easy one. Done in primary stage. The prime checking was not very efficient although accepted. |

10969 | f91 | Do just what is said! |

100 | 3n+1 Problem | What more to say about this problem. |

102 | Ecological Bin Packing | First thought too complex… and only 6 cases to handle…:) |

272 | Tex Code | |

458 | Decoder | |

483 | Word Scramble | |

575 | Skew Binary | |

591 | Box of Bricks | |

706 | LCD Display | Simulation related. Don’t print space after the last digits lines…? |

10041 | Vitos Family | |

10055 | Hashmat | |

10082 | WERTYU | |

10260 | Soundex | |

10327 | Flip Sort | |

10370 | Above Average | |

10931 | Parity | |

10223 | How Many Nodes | Introduction to Catalan Numbers, Easy |

11223 | O: Dah,dah,dah | Morse Code, String Manipulation, Succesfully used memset, 5WA due to n line |

10921 | Find The Telephone | Too easy string problem |

10945 | Mother Bear | At first I thought too much.. For odd length sentence I sorted out the middle palindrome letters such as I,A,M,O,H,U,V,W,X,Y but they just omitted the middle letter to detect the palindrome sentence. Just convert to Upper Case letters and find if matches. |

895 | Word Problem | Don’t worry about binary searching or something else.. Just do it the most simple way… |

10008 | Whats Cryptanalysis | Thought need to be bubble sort or something like that.. But thanks only flag did the magic.. String problem |

10062 | Tell me the frequencies | String problem, no sorting, wa due to n uff |

10222 | DecodeTheMadMan | For Some Input the question wasn’t clear. Disgusting. Else one of the easiest problem.fOOOOO |

10282 | Babel Fish | after 17 wa problem is accepted. Solved the problem using something like hasing… |

401 | Palindrome | Uff tried hard… thought of so many situations.. But omitted the single character condition.. At last accepted Thanks!!:)) |

160 | Factorial and Fraction | function called, and prime gereration problem tiddy biddy |

612 | DNA Sorting | solved using qsort and hashing. Quite easy. But another procedure tried was not to use any sorting but use only tree dimensional arrays |

10235 | Simply Emirp | Call Sieve. And be careful about the word “if it creates two different prime after reverse” them emirp |

10664 | The Luggage | I have done it adhoc way. Shows wa for input 3 3 3 3 2 2 2 2 2 2 2 2 2. But accepted:)) |

673 | Parentheses Problem | Stack Queue type. But I solved it on the go… fast enough, string problem I think |

494 | KindergartenCountingGame | Really kindergarten!! |

495 | FibonnaciFreeze | BigNum, Addition, made bignum addition myself no algo followed yet; used index/addition as variable name and got compilation error, important lesson learned |

10334 | Ray Through Glasses | silly change to 495 |

10579 | FibonnaciNumbers | same as 495 |

## 2 Responses to “UVa Online Judge (uva.onlinejudge.org) solved problem comments”

## Ashis

Hi, u r comment of uva problems are very sort. May u give some details or hints ?

Oh i read u r about page, so interesting. U write so many about you in ‘about’ page ! ! !

Hay, It’s u r personal matter but i have a little courtesy about that why even don’t give u’r name and name of educational institution.

Really your blog is nice.

## mzc

Hi, My name is Mashruf Zaman Chowdhury. I am a former student of SUST. Thanks for your comments.