原创 The Settlers of Catan UVA

Within Settlers of Catan, the 1995 German game of the year, players attempt to dominate an island by building roads

原创 揹包模板題Charm Bracelet

Bessie has gone to the mall’s jewelry store and spies a charm bracelet. Of course, she’d like to fill it with the b

原创 Silver Cow Party(好題)

給出n個點和m條邊,接着是m條邊,代表從牛a到牛b需要花費c時間,現在所有牛要到牛x那裏去參加聚會,並且所有牛參加聚會後還要回來,給你牛x,除了牛x之外的牛,他們都有一個參加聚會並且回來的最短時間,從這些最短時間裏找出一個最大值輸

原创 Wukong(好題)

Alice每天往返於A、B,Bob每天往返於C、D。他們很忙所以每次都會挑選最短的路線,儘管如此他們仍想增加見面的機會。 他們認爲兩個人所選路線的公共點越多見面機會越多。 Input 多組測試。 每組測試的第一行爲兩個數字N(1

原创 江西省賽Wave

Avin is studying series. A series is called “wave” if the following conditions are satisfied: It contains at least

原创 Diagonal Walking v.2

題目地址: 添加鏈接描述 題意:從 (0,0) 走到 (n,m),每一步可以向八個方向走一格,問恰好走 k 步能否到達,能到達則輸出最多能走多少斜步; 首先,判斷 -1 就看橫縱距離中的較大值是否大於 k ,因爲最少走 max(n

原创 Anya and Ghosts

題目:添加鏈接描述 題目大意:給出n個鬼訪問的時間,和每個蠟燭可以持續的時間,每次訪問最少需要的點燃的蠟燭數。問一共最少需要幾個蠟燭。 將每個蠟燭的點燃的時間儘量靠近訪問的時間,所以,統計第i個訪問時點燃的蠟燭,如果少於r,那麼要

原创 Yet Another Walking Robot(奇妙的記錄方式)

There is a robot on a coordinate plane. Initially, the robot is located at the point (0,0). Its path is described a

原创 Skyscrapers (easy version)

This is an easier version of the problem. In this version n≤1000 The outskirts of the capital are being actively bu

原创 Kefa and Park

Kefa decided to celebrate his first big salary by going to the restaurant. He lives by an unusual park. The park is

原创 類似火車票勾選打印功能實現:實現選哪個打哪個功能

思路:先把票遍歷到前臺,再把需要打印的票的id通過複選框選到,存到數組中,通過ajax傳值到後臺對應方法。遍歷之後傳到新的頁面,再將整個頁面打印!代碼

原创 棧和隊列--數組隊列

隊列: 一種線性結構(數組的子集) 規定只能在頭部取出數據(出隊),在尾部插入數據(入隊) 數組隊列的實現: 先定義一個接口Queue public interface Queue<E> { int getSize();

原创 棧和隊列---循環隊列

之所以出隊是on複雜度因爲出隊時候涉及到元素的移動,假如說我們出隊的時候元素不移動只是改變隊首的指向,出隊的時候改變隊尾下一個元素的位置的的指向, 那麼就會解決這個問題。 這是需要引入一種新的隊列循環隊列隊首用font 標記,用tail標

原创 棧和隊列--letcode應用

上一篇少一個main 方法測試,這次補上 main public class Main { public static void main(String[] args) { ArrayStack<Intege

原创 springBoot------SpringMVC自動配置

 1. Spring MVC auto-configuration: Spring Boot 自動配置好了SpringMVC(WebMvcAutoConfiguration ctrl+n搜索類名) - Inclusion of `Cont