Time of Update: 2018-12-03
// UVa Problem 108 - Maximum Sum// Verdict: Accepted// Submission Date: 2011-11-23// UVa Run Time: 0.112s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]// 該題可以歸結為網格上的演算法。實際上可以通過正交範圍查詢來解決,若是用嵌套迴圈來求矩形內元素和,難// 免
Time of Update: 2018-12-03
// UVa Problem 110 - Meta-Loopless Sorts// Verdict: Accepted// Submission Date: 2011-11-25// UVa Run Time: 0.196s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]// 啊哈,又是一道很有意思的類比題。本題解是依照題目所給的樣本類比產生插入排序的 Pascal 程式。#include
Time of Update: 2018-12-03
// UVa Problem 111 - History Grading// Verdict: Accepted// Submission Date: 2011-11-25// UVa Run Time: 0.052s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]// 可以將問題轉化為求最長上升子序列的問題。#include <iostream>#include <sstream>using
Time of Update: 2018-12-03
// The Closest Pair Problem (最近點對問題)// PC/UVa IDs: 111402/10245, Popularity: A, Success rate: low Level: 2// Verdict: Accepted// Submission Date: 2011-11-09// UVa Run Time: 0.240s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]//
Time of Update: 2018-12-03
// Chainsaw Massacre (電鋸驚魂)// PC/UVa IDs: 111403/10043, Popularity: B, Success rate: low Level: 3// Verdict: Accepted// Submission Date: 2011-11-14// UVa Run Time: 0.196s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]// 目標是 O(n^2)的演算法,否則容易
Time of Update: 2018-12-03
// UVa Problem 105 - Skyline Problem// Verdict: Accepted// Submission Date: 2011-11-22// UVa Run Time: 0.036s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]// 最初是想把交點都求出來,然後判斷交點是否在矩形內,但是寫出來的代碼醜陋難看,心想,難道沒有更好//
Time of Update: 2018-12-03
// UVa Problem 107 - The Cat in the Hat// Verdict: Accepted// Submission Date: 2011-11-23// UVa Run Time: 1.132s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]// 由於題目並未指明輸入資料的範圍,所以只有摸著石頭過河。本題解是基於輸入資料在 32 位整數以內的假// 設。////
Time of Update: 2018-12-03
// Edit Step Ladders (遞變階梯)// PC/UVa IDs: 110905/10029, Popularity: B, Success rate: low Level: 3// Verdict: Accepted// Submission Date: 2011-09-30// UVa Run Time: 2.108s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]// 遞變(edit
Time of Update: 2018-12-03
// Slash Maze (斜線迷宮)// PC/UVa IDs: 110904/705, Popularity: B, Success rate: average Level: 2// Verdict: Accepted// Submission Date: 2011-09-28// UVa Run Time: 0.012s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]//
Time of Update: 2018-12-03
// Fire Station (消防站)// PC/UVa IDs: 111003/10278, Popularity: B, Success rate: low Level: 2// Verdict: Accepted// Submission Date: 2011-10-05// UVa Run Time: 0.888s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]//
Time of Update: 2018-12-03
// The Tourist Guide (導遊)// PC/UVa IDs: 110903/10099, Popularity: B, Success rate: average Level: 3// Verdict: Accepted// Submission Date: 2011-09-27// UVa Run Time: 0.020s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]// Mr. G.
Time of Update: 2018-12-03
// The Problem With the Problem Setter (命題者的難題)// PC/UVa IDs: 111008/10092, Popularity: C, Success rate: average Level: 3// Verdict: Accepted// Submission Date: 2011-10-08// UVa Run Time: 0.060s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net////
Time of Update: 2018-12-03
// The Necklace (項鏈)// PC/UVa IDs: 111002/10054, Popularity: B, Success rate: low Level: 3// Verdict: Accepted// Submission Date: 2011-10-04// UVa Run Time: 0.556s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [Problem Description]// My little
Time of Update: 2018-12-03
// Playing With Wheels (擺弄輪子)// PC/UVa IDs: 110902/10067, Popularity: C, Success rate: average Level: 2// Verdict: Accepted// Submission Date: 2011-09-26// UVa Run Time: 0.380s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]// 是一個數學儀器,連續的數字 0
Time of Update: 2018-12-03
// Freckles (斑點)// PC/UVa IDs: 111001/10034, Popularity: B, Success rate: average Level: 2// Verdict: Accepted// Submission Date: 2011-10-03// UVa Run Time: 0.008s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]// 在 “Dick Van Dyke“ 的某一集中,小
Time of Update: 2018-12-03
// From Dusk till Dawn (從黃昏到拂曉)// PC/UVa IDs: 110907/10187, Popularity: B, Success rate: average Level: 3// Verdict: Accepted// Submission Date: 2011-10-02// UVa Run Time: 0.048s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]// Vladimir has
Time of Update: 2018-12-03
package com.geolo.android.tea.system;import java.util.concurrent.ArrayBlockingQueue;import java.util.concurrent.ThreadPoolExecutor;import java.util.concurrent.TimeUnit;/**線程池工具 * @author geolo*/public class MyThreadPool extends ThreadGroup{private
Time of Update: 2018-12-03
在閱讀boost原始碼,看到這個詞,以前從來沒有注意過,使用boost的時候也從來沒有留意它,其實它包含了作者的深思熟慮呢。safe bool idiom的起源來自於這樣子的一種用法:if( obj ) { ... },對於obj是built-in類型,那自然行得通,但是對於一個class或者struct就並不總是可以了。當然可以通過這樣子的用法來代替:if( obj.is_valid() ){},問題很明顯,第一煩瑣,第二通用性不夠,也許應該使用obj.Valid()或者obj.Empty()
Time of Update: 2018-12-03
// Tower of Cubes (立方體之塔)// PC/UVa IDs: 110906/10051, Popularity: C, Success rate: high Level: 3// Verdict: Accepted// Submission Date: 2011-10-01// UVa Run Time: 0.168s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [問題描述]// 給你 N
Time of Update: 2018-12-03
// UVa Problem 12016 - Herbicide// Verdict: Accepted// Submission Date: 2011-11-04// UVa Run Time: 4.112s//// 著作權(C)2011,邱秋。metaphysis # yeah dot net//// [解題方法]// 本題為計算幾何題,本質是點定位問題。使用射線法判斷點是否在除草劑形成的多邊形內。由於本題給定的// 座標均為整數,同時資料量大,容易