原创 拓撲排序解210. Course Schedule II

題目 There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, f

原创 動態規劃解152. Maximum Product Subarray

題目 Find the contiguous subarray within an array (containing at least one number) which has the largest product.

原创 人工智能:模擬退火初始溫度值的計算

1.模擬退火法簡介 模擬退火法是一種狀態空間的局部搜索算法,它屬於比較通用的尋找最優解的算法。 模擬退火算法從某一較高初溫出發,伴隨溫度參數的不斷下降,結合概率突跳特性在解空間中隨機尋找目標函數的全局最優解,即在局部最優解能概率性

原创 DFS解207. Course Schedule(判斷有向圖是否存在環)

題目 There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites,

原创 二進制邏輯運算求解187. Repeated DNA Sequences

題目 All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When

原创 如何在外網上中山大學的校園網

大山不放假中學終於放假了!(你的寒假餘額已經不足一個月…..) 當我們軟院的同學放假回到家,沒事可做想打開eden或者sicily等網站擼碼時候,卻發現網頁一直顯示“網頁無法打開”,這是因爲eden這些都是中大的內網,用外面的i

原创 319. Bulb Switcher解題報告

題目 There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb.

原创 274. H-Index解題報告

題目 Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compu

原创 306. Additive Number解題報告

題目 Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain a

原创 動態規劃解174Dice Possibility

題目 描述 What is possibility of rolling N dice and the sum of the numbers equals to M? 輸入 Two integers N and M. (1

原创 二進制邏輯運算求解137. Single Number II

題目 Given an array of integers, every element appears three times except for one, which appears exactly once. Find

原创 209. Minimum Size Subarray Sum解題報告

題目 Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray

原创 一維指針和二維指針指向二維數組的一些問題

廢話少說,先上自己Dev c++上的代碼: #include<stdio.h>int main (){ int c[2][3]={15,2,3,4,5,6}, *p, (*rp)[3],*q,i; p = (int*)c;

原创 並查集解1335 : Email Merge(hihocoder)

題目 描述 You are given a list of usernames and their email addresses in the following format: alice 2 alice@hihocoder.

原创 小二點餐用戶手冊

用戶手冊 小二點餐是一款專爲餐廳設計的點餐小程序,顧客通過掃餐廳每張桌子的二維碼可以瀏覽該餐廳的所有食品,並且可以完成下單的操作。當用戶完成下單之後,在商家的小程序端可以立即收到用戶的訂單記錄,從而提高了餐廳的工作效率,同時減少了顧客的等