原创 題目45:棋盤覆蓋

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=45 描述 在一個2^k × 2^k(1<=k<=100)的棋盤中恰有一方格被覆蓋,如圖1(k=2時),現用一缺角的2×

原创 Leetcode 60: Permutation Sequence

題目鏈接: https://leetcode.com/problems/permutation-sequence/description/ 描述 The set [1,2,3,…,n] contains a total of n!

原创 題目523:亡命逃竄

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=523 描述 從前有個叫hck的騎士,爲了救我們美麗的公主,潛入魔王的老巢,夠英雄吧。不過英雄不是這麼好當的。這個可憐的

原创 題目84:階乘的0

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=84 描述 計算n!的十進制表示最後有多少個0 輸入 第一行輸入一個整數N表示測試數據的組數(1<=N<=100) 每

原创 題目483:Nightmare

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=483 描述 Ignatius had a nightmare last night. He found himself

原创 LeetCode 67: Add Binary

題目鏈接: https://leetcode.com/problems/add-binary/description/ 描述 Given two binary strings, return their sum (also a b

原创 題目43:24 Point game

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=43 描述 There is a game which is called 24 Point game. In thi

原创 題目635:Oh, my goddess

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=635 描述 Shining Knight is the embodiment of justice and he ha

原创 題目927:The partial sum problem

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=927 描述 One day,Tom’s girlfriend give him an array A which co

原创 題目51:管閒事的小明

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=51 描述 某校大門外長度爲L的馬路上有一排樹,每兩棵相鄰的樹之間的間隔都是1米。我們可以把馬路看成一個數軸,馬路的一端

原创 題目1058:部分和問題

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=1058 描述 給定整數a1、a2、…….an,判斷是否可以從中選出若干數,使它們的和恰好爲K。 輸入 首先,n和k,n

原创 題目5:Binary String Matching

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=5 描述 Given two strings A and B, whose alphabet consist only

原创 題目88:漢諾塔(一)

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=88 描述 在印度,有這麼一個古老的傳說:在世界中心貝拿勒斯(在印度北部)的聖廟裏,一塊黃銅板上插着三根寶石針。印度教的

原创 題目738:Calendar Game

題目鏈接: http://acm.nyist.net/JudgeOnline/problem.php?pid=738 描述 Adam and Eve enter this year’s ACM International Coll

原创 C++(C)數字四捨五入函數

/* round vs floor vs ceil vs trunc */ #include <stdio.h> /* printf */ #include <math.h> /* round, floor,