摘要: 前言: 这道题属于直接存储类线性表,主要就是数组,日期的题目也算比较常见吧,这道题没啥特别,但就是WA了三次,中间有些细节还是值得记录的,顺便总结一下,日期类型的题,可以开一个结构数组来存,或者同时开几个一维数组分别存年份,月份,日期等等。 上题:POJ 2080 Describe: A calen 阅读全文
posted @ 2020-08-03 23:03 不敢说的梦 阅读(202) 评论(0) 推荐(0)
摘要: Describe: The Sultan of Nubia has no children, so she has decided that the country will be split into up to k separate parts on her death and each par 阅读全文
posted @ 2020-08-03 16:46 不敢说的梦 阅读(152) 评论(0) 推荐(0)
摘要: 八皇后问题 众所周知,八皇后问题,就是给你一个8*8的棋盘,你有8个皇后棋子,如何摆放棋子,使得他们不互相攻击,也就是说,如何摆放,使得任意两个棋子不在同一行,不在同一列,也不在同一个对角线。已经知道,有92种摆法。 思路解析 这是一道经典的回溯问题,很容易想到,我们可以搜索每一个位置,如果这个位置 阅读全文
posted @ 2020-08-03 14:44 不敢说的梦 阅读(332) 评论(0) 推荐(0)
摘要: Descirbe: There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a 阅读全文
posted @ 2020-08-03 11:33 不敢说的梦 阅读(120) 评论(0) 推荐(0)
摘要: Describe: In your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing a program whose output is a 阅读全文
posted @ 2020-08-03 09:41 不敢说的梦 阅读(189) 评论(0) 推荐(0)