-
P1288 取数游戏II
luogu原题 最近刚学了博弈论,拿来练练手qwq 其实和数值的大小并没有关系 我们用$N/P$态来表示必胜/必败状态 先在草稿纸上探究硬币在 最左侧(其实左右侧是等价的) 的一条长链的$N/P$态,设链长为$n$ 我们用$1$代替其他所有非$0$数 $n=2: 11$ $N$态 $n=3: 111$ $P$态...
2018-08-21 05:28:25
-
hdu-2553 N皇后问题(搜索题)
在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0...
2018-08-21 05:28:24
-
Face The Right Way POJ - 3276 (开关问题)
Face The Right Way Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6707 Accepted: 3123 Description Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing...
2018-08-21 05:28:13
-
poj-1700 crossing river(贪心题)
题目描述: A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order to row the boat back and forth so that all people may cross. Eac...
2018-08-21 05:28:15
-
poj-3253 fence repair(贪心题)
题目描述: Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length L i (1 ≤ L i ≤ 50,000) units. He then purchas...
2018-08-21 05:28:12
-
Meteor Shower POJ - 3669 (bfs+优先队列)
Meteor Shower Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 26455 Accepted: 6856 Description Bessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they hit....
2018-08-21 05:28:09
-
(转载)const的用法,特别是用在函数前面与后面的区别
const的用法,特别是用在函数后面 在普通的非 const成员函数中,this的类型是一个指向类类型的 const指针。可以改变this所指向的值,但不能改变 this所保存的地址。 在 const成员函数中,this的类型是一个指向 const类类型对象的 const指针。既不能改变 this所指向的对...
2018-08-21 05:28:09
-
POJ 1011 Sticks解题报告
Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had originally and how long they were origina...
2018-08-17 09:37:25
-
【共读Primer】21.<4.1> 表达式基础 Pa
基本概念 一元运算符: 作用于一个运算对象的,比如: (取地址) *(解引用) ++(自增) --(自减) 二元运算符: 作用于两个运算对象的,比如: + (求和) -(求差) ==(逻辑等) 所有运算符中二元运算符居多。 三元运算符: 作用于三个运算对象的, a b ? a : b;...
2018-08-17 09:37:22
-
Leetcode-890 可能的二分法
1 struct UnionFindSet 2 { 3 int * ID; 4 int * Auxiliary; 5 int GroupSum; 6 int WeightOriginalTotal; 7 }; 8 9 struct UnionFindSet* UnionFindSetInit( int WeightTotal) 10 { 11 struct UnionFindSet *UFSet = ( struct UnionFindSet *) malloc ( sizeof ( stru...
2018-08-17 09:37:21
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash




