title: Morris' Blog subtitle: Can you find me ? description: ACMer NEET NCU UVa OJ author: Shiang-Yun Yang email: [email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 20150101 - 20150225 Facebook Timeline. | |
[UVa]1679 - Easy Geometry 開學第一題! | |
在凸多邊形內部找一最大空白矩形。多邊形頂點數最多 10 萬個。 | |
三分內嵌三分再內嵌二分,幾何算法從函數觀點下手的有趣題目。 | |
〔UVa〕12415 - Digit Patterns | |
讀入一個 regex,一個主字串 s,請問有不同的 i 滿足 s 的子字串 s[j...i] 符合 regex,套用 NFA 轉換成 DFA,可惜的是壓縮後狀態數還是太多,即使通過劉汝佳給的 small gift testdata,而且裡面倒數第二筆測資輸出有誤。當初學的時候就有這個疑問,果然狀態總數的增長非常大。 | |
所謂的動態 NFA 轉換 DFA 指得到底是什麼?又被劉汝佳坑了一題 QQQQQQQQ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ awk '{ sub("\r$", ""); print }' out.txt > output.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@%~d1 | |
@cd "%~1" > NUL | |
@C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bars | |
name city owner | |
joe bar champaign joe | |
green st bar champaign sally | |
purple bar urbana paul | |
drunk urbana bob | |
bar bar Decatur zoe | |
beers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 找出 drinker 名稱為 alex 的人以及他常去的酒吧 | |
SELECT drinker, bar FROM `frequents` WHERE drinker = 'alex' | |
2. 列出 每個 drinker 的名稱 及 有幾種喜歡喝的酒 | |
SELECT drinker, COUNT(*) FROM `likes` INNER JOIN `drinkers` ON likes.drinker = drinkers.name GROUP BY drinker | |
3. 列出 所有賣的酒的平均價錢 < 4 的 bar name 及平均價錢 |
NewerOlder