Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appe
杭電 HDU 1032 The 3n + 1 problem
The 3n + 1 problemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/327
poj 3129 How I Wonder What You Are! 點積求兩向量夾角
水題,直接貼代碼。 //poj 3129//sep9#include #include using namespace std;const doubl
[LeetCode]Rotate List
Given a list, rotate the list to the right by k places, where k is non-negative
LeetCode Rotate Array
Rotate Array Total Accepted: 12759 Total Submissions: 73112 My Submissions Quest
Codeforces Round #296 (Div. 2)——A.B.C.D
A. Playing with Paper給一張矩形的紙,每次對折成一個正方形,然後對剩下的矩形重復操作,求最多可以獲得多少個矩形#include#
LeetCode Reverse Integer
Reverse Integer Total Accepted: 61132 Total Submissions: 219035 My Submissions Q
[LeetCode]Surrounded Regions,解題報告
目錄目錄 前言 題目 思路1_DFS 思路2_BFS前言最近這兩天為了解決Android Rom適配一個底層的問題,天天熬夜到2點,導致原定了LeetCode刷
(hdu 簡單題 128道)平方和與立方和(求一個區間的立方和和平方和)
題目: 平方和與立方和Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768
uva 10130 SuperSale (01背包)
uva 10130 SuperSale 題目大意:每組數據包括兩個部分:1)貨物的價值及重量 2)每個人的最大負重量。要求這些人所能帶走的最大價值。 解題思
POJ 3070 Fibonacci.(矩陣快速冪)
解題思路:用公式遞推顯然是會超時的,於是根據題目明顯的提示,就想到用矩陣快速冪。之所以快,是運用了二分的思想,算出了矩陣A的值,那麼我可以一步算出A*A的值,進
[LeetCode] Fraction to Recurring Decimal
Fraction to Recurring DecimalGiven two integers representing the numerator