有些內容使用中英雙語,有些只有英文或中文。歡迎使用與分享任何內容,但先來信告知並標示此部落格為出處。
Some parts use both Chinese and English, but some parts use only one language. Feel free to share, but please contact me first and list this blog as your reference.

2014年3月1日 星期六

UVa OJ - 11462 Age Sort

The following program is my ACcepted code for UVA-11462 .
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 11462 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

此題為簡單的sort ,我使用了 algorithm library 中已經有的sort
因為0<n<=2000000 比較大,所以我把陣列設為全域變數 (main 外面)

This problem use sort. I use the "sort" in algorithm library.
Because 0<n<=2000000, I set the array as global variable. (outside the main function)

2014年2月28日 星期五

UVa OJ - 612 DNA Sorting

The following program is my ACcepted code for UVA-612 .
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 612 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

一個非常好的練習題
題目敘述很簡單,本題精華在於使用struct 和 sort
使用 struct 可以將 DNA 跟計算後的 measure 包在一起
如此在排序 measure 之後,只要直接輸出即可
PS: 請注意如果measure相同,要照著input的順序輸出! 所以我使用 stable_sort

A good practice problem!
The description is simple, but you have to be careful.
The essence of this problem is using struct and sort.
Using struct can block the DNA data and measure.
Then after we sort the measures, we only have to output the DNA!
PS: Please not that: if measures are the same, output the same order they are in the input file!

UVa OJ - 10783 Odd Sum

The following program is my ACcepted code for UVA-1724.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 1724的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

UVa OJ - 10222 Decode the Mad man

The following program is my ACcepted code for UVA-10222.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 10222 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

UVa OJ - 993 Product of digits

The following program is my ACcepted code for UVA-993.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 993 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

2014年2月27日 星期四

UVa OJ - 10018 Reverse and Add

The following program is my ACcepted code for UVA-10018.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 10018 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

UVa OJ - 10035 Primary Arithmetic

The following program is my ACcepted code for UVA-10035.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 10035 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

UVa OJ - 10055 Hashmat the brave warrior

The following program is my ACcepted code for UVA-10055.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 10055 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

UVa OJ - 458 The Decoder

The following program is my ACcepted code for UVA-458 .
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UVA 458 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

2014年2月26日 星期三

NTHU OJ - 7488 哪種三角形?! (II)

The following program is my ACcepted code for NTHU-7488.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃NTHU 7488 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

NTHU OJ - 7483 哪種三角形?!(I)

The following program is my ACcepted code for NTHU-7483 .
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃NTHU 7483 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

NTHU OJ - 1002 String Reverse

The following program is my ACcepted code for NTHU-1002.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃NTHU 1002的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

點這裡看題目 Click here to see this Problem!

2014年2月25日 星期二

UVa OJ - 353 Pesky Palindromes

The following program is my ACcepted code for UVA-353.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UAV 353 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

//This program is for UVA 353 Pesky Palindromes
//http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=5&page=show_problem&problem=289

UVa OJ - 913 Joana and the Odd Numbers

The following program is my ACcepted code for UVA-591.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UAV 591 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

2014年2月24日 星期一

UVa OJ - 591 Box of Bricks

The following program is my ACcepted code for UVA-591.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UAV 591 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )

UVa OJ - 494 Kindergarten Counting Game

The following program is my ACcepted code for UVA-494.
It's a for everybody to learn and discuss.
If there is any mistake or comment, please let me know.  :D

此乃UAV 494 的AC code!
歡迎一同討論學習,如有錯誤與任何建議請留言 : )