This is my blog.
大数据的时代怎么能少了高精度呢!
动态规划--LIS and LCS
This is my blog.
动态规划问题中,有一类便是求最长上升子序列和最大公共子序列的问题。如何求长度,如何输出序列,如何优化呢!在阅读之中,我将其总结如下。
usaco 2.1.1 castle
This is my blog.
背景:In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have only the winning number for the lottery! Farmer John won a fabulous castle in the Irish countryside.
Bragging rights being what they are in Wisconsin, Farmer John wished to tell his cows all about the castle. He wanted to know how many rooms it has and how big the largest room was. In fact, he wants to take out a single wall to make an even bigger room.
Your task is to help Farmer John know the exact room count and sizes.
The castle floorplan is divided into M (wide) by N (1 <=M,N<=50) square modules. Each such module can have between zero and four walls. Castles always have walls on their “outer edges” to keep out the wind and rain.