题目链接:hdu 4775 Infinite Go 题目大意:两个人下围棋,总共走了n步。黑棋和白棋交替走,假设一片棋的上下左右被封死,那么该片棋子就会被吃掉,问说最后黑白棋各剩多少个。 解题思路:比較恶心的模拟题,相邻同样色的棋子要用并查集连接。而且要记录每片棋子还剩的空格数。假设空格数为0的话说
分类:
其他好文 时间:
2016-03-16 13:59:05
阅读次数:
216
In computer science, a binary tree is a tree data structure in which each node has at most two children. Consider an infinite full binary tree (each n
分类:
其他好文 时间:
2016-03-13 14:34:03
阅读次数:
184
题目链接:uva 10627 - Infinite Race 题目大意:一段路。两个人在这条路上来回走,求相遇次数 解题思路:相遇有两种,一种是追击,一种是相对 追击:t?(u?v)=(2?k+1)?L 相对:t?(u+v)=(2?k+1)?L 可是有一种特殊情况。就是在边界相遇的时候,会被考虑两次
分类:
其他好文 时间:
2016-03-05 10:10:25
阅读次数:
163
【转】http://www.hawstein.com/posts/8.7.html 题目 原文: Given an infinite number of quarters (25 cents), dimes (10 cents), nickels (5 cents) and pennies (1 c
分类:
其他好文 时间:
2016-02-26 11:57:12
阅读次数:
204
原文链接:http://www.ncloud.hk/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/umbraco7the-navigation-menu-and-a-parent-page-with-in-finite-children/ Master Template
分类:
其他好文 时间:
2016-02-19 09:09:36
阅读次数:
152
简单题,公式打了个表,查询的时候二分一下就行。也可以直接o(1)公式出解。 #include <stdio.h> #include <algorithm> #include <string.h> #include <queue> #include <stack> #include <map> #in
分类:
其他好文 时间:
2016-02-15 10:43:23
阅读次数:
123
Description Consider the infinite sequence of integers: 1,?1,?2,?1,?2,?3,?1,?2,?3,?4,?1,?2,?3,?4,?5.... The sequence is built in the following way: at
分类:
其他好文 时间:
2016-02-12 09:25:16
阅读次数:
223
A - Infinite Sequence 题意:有一种这样的无限序列数 1,1,2,1,2,3..... (如果最大数n,那么就有从1到n的所有1到n的数); 思路:题意只给了1秒、直接模拟肯定超时,我用的是二分找下界 1 #include<iostream> 2 using namespace
分类:
其他好文 时间:
2016-02-11 01:39:02
阅读次数:
260
Python的内建模块itertools提供了非常有用的用于操作迭代对象的函数。 1、Infinite Iterators IteratorArgumentsResultsExample count() start, [step] start, start+step, start+2*step, .
分类:
编程语言 时间:
2016-02-09 12:48:44
阅读次数:
608
Monte Carlo algorithm will return an answer that is not necessarilycorrect within a reasonable amount of time.Las Vegas algorithm may take infinite ti...
分类:
编程语言 时间:
2015-12-31 00:10:25
阅读次数:
614