原创 UVa OJ 10954 - Add All

UVa OJ 10954 - Add All Problem 有n(n≤5000)個數的集合S,每次可以從S中刪除兩個數,然後把它們的和放回集合, 直到剩下一個數。每次操作的開銷等於刪除的兩個數之和,求最小總開銷。所有數均小於 1

原创 The Python Challenge Level-6 Solution

The Python Challenge Level-6 Solution 先附上我在Github上存放的代碼倉庫: The Python Challenge 這道題目開始讓人很迷茫了(至少我是這樣),先點開網頁源碼,沒發現什麼有

原创 UVa OJ 1471 - Defense Lines

UVa OJ 1471 - Defense Lines Problem After the last war devastated your country, you - as the king of the land of Ar

原创 The Python Challenge Level-5 Solution

The Python Challenge Level-5 Solution 先附上我在Github上存放的代碼倉庫: The Python Challenge 先看提示: pronounce it 再看看網頁源碼,’peak h

原创 The Python Challenge Level-3 Solution

The Python Challenge Level-3 Solution 先附上我在Github上存放的代碼倉庫: The Python Challenge 這裏按照題目意思,利用正則匹配,找到恰好分別被三個大寫字母包在左右的小

原创 UVa OJ 1331 - Minimax Triangulation

UVa OJ 1331 - Minimax Triangulation Problem Here is the: problem link Solution 這道題目一開始用遞歸做,但是時間比較長,於是花了比較長的時間去想應該怎麼才能轉化

原创 UVa OJ 12186 - Another Crisis

UVa OJ 12186 - Another Crisis Problem A couple of years ago, a new world wide crisis started, leaving many people with

原创 字幕文件批量重命名腳本(二) —— Linux

還是老樣子,先上GitHub:Yuuki_Dach’s GitHub 上次自己寫了一個字幕批量重命名的腳本,結果發現在處理字幕文件的時候還是存在bug(畢竟是自己一邊看番,一邊測試+改進,沒有特意的去找測試樣本) 首先是關於視頻文件的查

原创 字幕文件批量重命名腳本 —— Linux

現在更新博客的速度大大降低了,主要還是認爲把自己做的題目傳上來對別人和自己的幫助都不是很大。行,廢話少說,我們切入正題吧。 剛剛閒來無事,想到之前看番的時候,有些另外下載的字幕會和視頻名字不匹配,給觀看帶來不必要的麻煩,所以動手寫了一個比

原创 UVa OJ 12265 - Selling Land

UVa OJ 12265 - Selling Land Problem 輸入一個n*m(1≤n,m≤1000)矩陣,每個格子可能是空地,也可能是沼澤。對於每個空地格子,求出以它爲右下角的空矩形的最大周長,然後統計每個周長出現了多少次。 I

原创 UVa OJ 1625 - Color Length

UVa OJ 1625 - Color Length Problem Here is the prolem link Solution 這道題目要先處理好每個顏色的起止位置,不然會很不方便。用數組d[i][j]表示已經插入了第一個字符串的

原创 UVa OJ 10003 - Cutting Sticks

UVa OJ 10003 - Cutting Sticks Problem You have to cut a wood stick into pieces. The most affordable company, The Analog

原创 UVa OJ 11584 - Partitioning by Palindromes

UVa OJ 11584 - Partitioning by Palindromes Problem Here is the: link Solution 先對字符串進行預處理,把迴文字符串的長度全部記錄下來,然後用DP對迴文字符串的個數

原创 UVa OJ 11400 - Lighting System Design

UVa OJ 11400 - Lighting System Design Problem You are given the task to design a lighting system for a huge conference

原创 The Python Challenge Level-11 Solution

The Python Challenge Level-11 Solution 先附上我在Github上存放的代碼倉庫: The Python Challenge 這個題目感覺就很玄乎了,就只給我們一張圖片,網頁源碼裏空空如也 這裏實際上是