原创 Sicily 1011. Lenny's Lucky Lotto

1011. Lenny's Lucky Lotto   Time Limit: 1sec    Memory Limit:32MB Description Lenny likes to play the ga

原创 Time 類可以實現調整和重新設置,顯示時間,將兩個時間相加的功能

可以計算兩個時間段的相加減,以及operator+()的使用方法: 以下是程序: myTime.h #include<iostream> #ifndef MYTIME1_H_ #define MYTIME1_H_ class Time

原创 Sicily 1543. Completing Brackets

Description A series of brackets is complete if we can pair off each left bracket '[' with a right bracket ']' that o

原创 求一個3X3矩陣轉置問題

時間限制:3000 ms  |  內存限制:65535 KB 難度:2 描述求一個三行三列的轉置矩陣。 輸入第一行一個整數n<20,表示有n組測試數據,下面是n組數據; 每組測試數據是九個整型數(每個數都不大於10000),

原创 Sicily 1780. Faulty Odometer Again

Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect,

原创 Sicily 11157. Crossword

11157. Crossword     Time Limit: 1sec    Memory Limit:256MB Description Mirko has assembled an excel

原创 Sicily 1511. Conversions

        Time Limit: 1sec    Memory Limit:32MB Description Conversion between the metric and English measurem

原创 Sicily 14513. Aaah!

14513. Aaah!                 Time Limit: 1sec    Memory Limit:256MB Description Jon Marius sho

原创 第十一週程序設計課作業解題報告

第十一週程序設計課作業解題報告 嗯.......我不知道有沒有人會打我呢?因爲這周的解題報告或許是字數最少了的=w=因爲都是定義題啊,就看同學們有沒有好好上課了。1000. int add(int a, int b){     ret

原创 Sicily 1814. 日期計算問題

【轉自網絡大神,由本人整理】 Description 試用 C++的類來表示日期,給定 2 個日期 yyyy.mm.dd 求兩個日期間相差的天數。   Input 第 1 行爲一個正整數T,表示測試數。 對於每個測試點,第 1

原创 Sicily 1002. Static Member

1002. Static Member                 Time Limit: 1sec    Memory Limit:256MB Description /*  測試s

原创 Sicily 1119. Factstone Benchmark

1119. Factstone Benchmark                 Time Limit: 1sec    Memory Limit:32MB Description Am

原创 Sicily 1500. Prime Gap

Description The sequence of n ? 1 consecutive composite numbers (positive integers that are not prime and not equal

原创 第十六週往年期末考試題I解題報告

第十六週往年期末考試題I解題報告  1000. Running Test題目大意:給出一個人每秒跑多少釐米,輸出他跑800米所用秒數(向上取整)解:單位轉換一下,向上取整有標準庫函數ceil #include <cstdio> #i

原创 Sicily 1782. Knapsack

Description John wants to carry several items with a knapsack. Each item has integral size and can not be divided in