原创 HDU - 1870
四月一日快到了,Vayko想了個愚人的好辦法——送禮物。嘿嘿,不要想的太好,這禮物可沒那麼簡單,Vayko爲了愚人,準備了一堆盒子,其中有一個盒子裏面裝了禮物。盒子裏面可以再放零個或者多個盒子。假設放禮物的盒子裏不再放其他盒子。 用()
原创 UVA - 11988
You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problemwith the keyboard is t
原创 POJ - 3750
有N個小孩圍成一圈,給他們從1開始依次編號,現指定從第W個開始報數,報到第S個時,該小孩出列,然後從下一個小孩開始報數,仍是報到S個出列,如此重複下去,直到所有的小孩都出列(總人數不足S個時將循環報數),求小孩出列的順序。 Input
原创 UVA - 101
題解:#include<iostream> #include<cstdio> #include<cstring> #include<string>
原创 HDU - 1237
讀入一個只包含 +, -, *, / 的非負整數計算表達式,計算該表達式的值。 Input測試輸入包含若干測試用例,每個測試用例佔一行,每行不超過200個字符,整數和運算符之間用一個空格分隔。沒有非法表達式。當一行中只有0時輸入結束,
原创 HDU - 1022
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by
原创 HDU - 1702
ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put
原创 UVA - 673
You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a) if it is th
原创 POJ - 1363
There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last ce
原创 C語言_時間日期函數
以下代碼爲獲取系統當前時間 #include <stdio.h> #include <stddef.h> #include <time.h> int main(void) { time_t timer;//time_t就是long
原创 UVA - 133
In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour RhinocerosParty has decided on
原创 HDU - 1443
The Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n peopl
原创 UVA - 12657
#include<cstdio> #include<cstring> using namespace std; int left[100005], right[100005]; void link(int l, int r)
原创 HDU - 1020
Given a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing
原创 #424
A. Unimodal Array it is strictly increasing in the beginning; after that it is constant; after that it is strictly de