原创 【CodeForces 1365A --- Matrix Game】

【CodeForces 1365A --- Matrix Game】 題目來源:點擊進入【CodeForces 1365A — Matrix Game】 Description Ashish and Vivek play a ga

原创 【CodeForces 1365E --- Maximum Subsequence Value】

【CodeForces 1365E --- Maximum Subsequence Value】 題目來源:點擊進入【CodeForces 1365E — Maximum Subsequence Value】 Descriptio

原创 【Shiro】shiro標籤

【Shiro】shiro標籤1. 導入shiro標籤庫2. 身份認證3. 角色校驗4. 權限校驗5. 自定義標籤6. thymeleaf配置支持shiro標籤 1. 導入shiro標籤庫 <%@ page contentType=

原创 【CodeForces 1366B--- Shuffle】

【CodeForces 1366B--- Shuffle】 題目來源:點擊進入【CodeForces 1366B— Shuffle】 Description You are given an array consisting of

原创 【Shiro】shiro記住我功能

【Shiro】shiro記住我功能 在登錄後,可以將⽤戶名存在cookie中,下次訪問時,可以先不登錄,就可以識別身份。 在確實需要身份認證時,⽐如購買,⽀付或其他⼀些重要操作時,再要求⽤戶登錄即可,⽤戶體驗好。 由於可以保持⽤戶

原创 【CodeForces 1366A --- Shovels and Swords】思維

【CodeForces 1366A --- Shovels and Swords】思維 題目來源:點擊進入【CodeForces 1366A — Shovels and Swords】 Description Polycarp p

原创 【CodeForces 1366C--- Palindromic Paths】思維

【CodeForces 1366C--- Palindromic Paths】思維 題目來源:點擊進入【CodeForces 1366C— Palindromic Paths】 Description You are given

原创 【計蒜客 A1139 --- 程序設計:引爆炸彈】dfs || 並查集

【計蒜客 A1139 --- 程序設計:引爆炸彈】dfs || 並查集 題目來源:點擊進入【計蒜客 A1139 — 程序設計:引爆炸彈】 Description 在一個n×m的方格地圖上,某些方格上放置着炸彈。手動引爆一個炸彈以後

原创 【HDU 3068 --- 最長迴文】Manacher算法

【HDU 3068 --- 最長迴文】Manacher算法 題目來源:點擊進入【HDU 3068 — 最長迴文】 Description 給出一個只由小寫英文字符a,b,c…y,z組成的字符串S,求S中最長迴文串的長度. 迴文就是

原创 【計蒜客 A1633 --- 程序設計:蒜頭君的數軸】gcd

【計蒜客 A1633 --- 程序設計:蒜頭君的數軸】gcd 題目來源:點擊進入【計蒜客 A1633 — 程序設計:蒜頭君的數軸】 Description 今天蒜頭君拿到了一個數軸,上邊有 n 個點,但是蒜頭君嫌這根數軸不夠優美,

原创 【CodeForces 1366D --- Two Divisors】思維+gcd

【CodeForces 1366D --- Two Divisors】思維+gcd 題目來源:點擊進入【CodeForces 1366D — Two Divisors】 Description You are given n in

原创 【Shiro】shiro自定義Realm

【Shiro】shiro自定義Realm1. 創建數據庫表2. Dao層和Service層3. 自定義Realm4. 配置Realm shiro中realm的是進行認證和授權的組件,自帶了幾種實現,比如jdbcRealm和iniR

原创 【HDU 1698 --- Just a Hook】線段樹水題

【HDU 1698 --- Just a Hook】線段樹水題 題目來源:點擊進入【HDU 1698 — Just a Hook】 Description In the game of DotA, Pudge’s meat hoo

原创 【Shiro】Spring集成shiro

【Shiro】Spring集成shiro1. 導入依賴2. 配置applicationContext.xml3. 配置web.xml 1. 導入依賴 <!-- 其他依賴和web集成中 ⼀致 ,此處省略--> <!-- 新增⼀個依賴

原创 【CodeForces 1365B --- Trouble Sort】

【CodeForces 1365B --- Trouble Sort】 題目來源:點擊進入【CodeForces 1365B — Trouble Sort】 Description Ashish has n elements ar