原创 A1034 Head of a Gang (30分)

One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A a

原创 A1033 To Fill or Not to Fill (25分)

With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is

原创 A1032 Sharing (25分)

To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may

原创 A1004 Counting Leaves (30分)

A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child

原创 A1005 Spell It Right (20分)

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the s

原创 A1031 Hello World for U (20分)

Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworl

原创 基礎排序

基礎排序 交換函數 void swap(int arr[], int i, int j) { int tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; }

原创 遊戲海報

題目描述 小明有26種遊戲海報,用小寫字母"a"到"z"表示。小明會把遊戲海報裝訂成冊(可能有重複的海報),冊子可以用一個字符串來表示,每個字符就表示對應的海報,例如abcdea。小明現在想做一些“特別版”,然後賣掉。特別版就是會從所有海

原创 字符串包含

題目描述 我們定義字符串包含關係:字符串A=abc,字符串B=ab,字符串C=ac,則說A包含B,A和C沒有包含關係。 輸入描述: 兩個字符串,判斷這個兩個字符串是否具有包含關係,測試數據有多組,請用循環讀入。 輸出描述: 如果包含輸

原创 UNIX/Linux體系結構與系統調用

操作系統在計算機體系中的位置 內核的功能 內存管理 內存分配調用 包括靜態分配方式、動態分配方式; 內存保護 確保每個程序在自己的內存空間運行、互不干擾。方法是使用界限 寄存器或存儲保護鍵; 地址映射 實現程序的邏輯地址與存儲

原创 如何解決:MySQL安裝到最後一步就卡死?

正常安裝MySQL(如果已經安裝過,先卸載乾淨); 完全卸載請看:完全卸載MySQL 注意,不要勾選 “Launch the MySQL Instance Configuration Wizard” 打開MySQL安裝路徑,進

原创 MySQL安裝與配置

Typical:經典安裝,服務端+客戶端 Custom:自定義安裝,自己點擊 Complete:全部安裝,耗磁盤空間 系統彈出對話框,選擇是 系統彈出對話框,選擇是 Detailed Configuration 精

原创 配置文件my.ini的簡單介紹與MySQL服務的關閉與打開

端口號配置 數據庫文件實際存放的位置 數據庫編碼格式 存儲的引擎 最大連接數 修改配置後必須重新啓動服務 通過服務 通過控制檯 以管理員身份打開控制檯 net stop MySQL關閉服務 net start MySQ

原创 MySQL環境變量配置

Windows查詢環境是從前往後找的

原创 二維數組的查找

題目描述 在一個二維數組中(每個一維數組的長度相同),每一行都按照從左到右遞增的順序排序,每一列都按照從上到下遞增的順序排序。請完成一個函數,輸入這樣的一個二維數組和一個整數,判斷數組中是否含有該整數。 解法一 public class