原创 hdu 5418 (狀壓dp)

Victor and World Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/131072 K (Java/Others) Total Submission

原创 洛谷 P1896 [SCOI2005]互不侵犯 狀壓dp

在N×N的棋盤裏面放K個國王,使他們互不攻擊,共有多少種擺放方案。國王能攻擊到它上下左右,以及左上左下右上右下八個方向上附近的各一個格子,共8個格子。 注:數據有加強(2018/4/25) 輸入格式 只有一行,包含兩個數N,K ( 1 <

原创 數位dp hdu2089

杭州人稱那些傻乎乎粘嗒嗒的人爲62(音:laoer)。  杭州交通管理局經常會擴充一些的士車牌照,新近出來一個好消息,以後上牌照,不再含有不吉利的數字了,這樣一來,就可以消除個別的士司機和乘客的心理障礙,更安全地服務大衆。  不吉利的數字

原创 poj 2411 狀壓dp

Mondriaan's Dream Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 23134   Accepted: 12887 Description Squa

原创 最短路 hdu2923

Einbahnstra  e (German for a one-way street) is a street on which vehicles should only move in one direction. One reaso

原创 字典樹 Ancient Printer

The contest is beginning! While preparing the contest, iSea wanted to print the teams' names separately on a single pap

原创 Proud Merchants 01揹包

K - Proud Merchants    Recently, iSea went to an ancient country. For such a long time, it was the most wealthy and pow

原创 2019 上海網絡賽 stone game DP

題目要求 從總石頭堆中選取若干個石頭爲一堆,滿足這堆石頭大於等於剩下的石頭和,且任意拿走一個石頭都會小於等於剩下的。 仔細想想就可以知道,只要這堆石頭的最小值滿足要求,那麼該堆石頭肯定是符合要求的。 所以所有的狀態都和最小值的石頭有關  

原创 The program 'gcc' is currently not installed. You can install it by typing: apt install gcc

最近想升級一下Linux的gcc和g++,但是升級完了以後不知道怎麼搞的我的gcc -v一直顯示已經安裝,然後沒有更新。。。。  雖然我也不知道怎麼搞的 運行一下 sudo apt install --reinstall gcc 重新

原创 Equalizing by Division (hard version)

這道題好暴力啊。。。。。。 把所 有數到0的轉移狀態和權值都記錄下來,這裏就用V【i】【j】表示 1~1e6的數轉化到i的步數 #include <queue> #include <cstdio> #include <set> #inc

原创 歐拉降冪 B. super_log

簡化題意,就是求出 A^(A^(A^(A^(A^(A)^))))(B+ 1層) % C 的值 ackerman函數的三階,A,B,C三個數都在1e6以內,這裏就要用到歐拉降冪 A^(B) % C  1.若 B >= C A^(B % φ(

原创 poj 3280 區間dp

B - Cheapest Palindrome Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Desc

原创 hdu 2069 完全揹包dp

A - Coin Change Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description

原创 hdu 4902 線段樹

There is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things.

原创 hdu 4576 概率dp

Michael has a telecontrol robot. One day he put the robot on a loop with n cells. The cells are numbered from 1 to n cl