原创 隨機迷宮生成器 (隊列+隨機處理,BFS+隨機處理)

自制程序: 給定一個大小以及起點跟終點的座標,隨機生成一個迷宮以及破解路線 思路一:根據存儲的起點跟終點座標來判斷行進的方向,分別爲左上左下右上右下,如果是左上則只能向上走或者向右走,保證一定能夠到達終點,運用隊列來實現這個過程,

原创 2019.5.11 Cross The Threshold Play 上

前六道爲各個算法的入門題,後面五道爲CF的水題,那天做完到現在還困 學長大佬們速度太快了555 比賽地址:https://cn.vjudge.net/contest/301016#problem A HDU - 1272 小希的迷宮

原创 2019.5.11 Cross The Threshold Play 下

接上篇 H CodeForces - 1117B Emotes There are n n emotes in very popular digital collectible card game (the game is prett

原创 2019.4.30 WAGV CF Team replay

前言 4月30號的2小時CF重現賽,基本都是DIV2的水題,目標是訓練CF題目的題感來上分,主要是讀英文題有困難,對題意理解困難… 比賽地址:https://cn.vjudge.net/contest/298841#status/49

原创 POJ - 1456 Supermarket (排序+貪心)

超市裏有N個商品. 第i個商品必須在保質期(第di天)之前賣掉, 若賣掉可讓超市獲得pi的利潤. 每天只能賣一個商品. 現在你要讓超市獲得最大的利潤. Input 多組數據. 每組數據第一行爲一個整數N (0 <= N <= 1000

原创 ZOJ - 3944 People Counting (模擬)

In a BG (dinner gathering) for ZJU ICPC team, the coaches wanted to count the number of people present at the BG. The

原创 HDU - 6098 Inversion (模擬)

Give an array A, the index starts from 1. Now we want to know B i max i∤j A j Bi=maxi∤jAj , i≥2 i≥2 . Input The first

原创 Gym - 101911I Heist (簽到題)

There was an electronic store heist last night. All keyboards which were in the store yesterday were numbered in asce

原创 Gym - 101911C Bacteria (數學規律+優先隊列)

C. Bacteria time limit per test2.0 s memory limit per test256 MB inputstandard input outputstandard output Recently M

原创 Gym - 101911H Theater Square (找規律)

The Theater Square can be represented as a rectangle having height n n and length m m , divided into square 1×1 1×1 c

原创 Codeforces contest 1119 problem A Ilya and a Colorful Walk (簡單模擬)

Ilya lives in a beautiful city of Chordalsk. There are n n houses on the street Ilya lives, they are numerated from 1

原创 POJ - 3723 Conscription (最小生成樹,Kruskal)

Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wa

原创 LightOJ - 1341 Aladdin and the Flying Carpet (歐拉素數篩+唯一分解定理)

It’s said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. H

原创 FZU - 2232 爐石傳說 (匈牙利算法)

GG學長雖然並不打爐石傳說,但是由於題面需要他便學會了打爐石傳說。但是傳統的爐石傳說對於剛入門的GG學長來說有點複雜,所以他決定自己開發一個簡化版的爐石傳說。 在簡化版的爐石傳說中: 每個隨從只有生命值和攻擊力,並且在你的回合下,你的

原创 輸入年月日,計算星期幾 (數學推理)

自制程序:輸入年月日,以空格隔開,輸出當天的星期數。時間範圍爲公元2000-2600年 代碼如下: #include <iostream> using namespace std; int main() { cout<<"輸入