The Toy of Flandre Scarlet
Time Limit: 2 Seconds Memory Limit: 65536 KB
As you know, Flandre Scarlet loves her elder sister Remilia Scarlet, and of course, Remilia loves Flandre, too. B...
分类:
其他好文 时间:
2014-05-15 07:06:45
阅读次数:
259
/*
* hdu How many prime numbers
* date 2014/5/13
* state AC
*/
#include
#include
#include
using namespace std;
bool isPrime(int x)
{
int sqr=sqrt(x*1.0);
for(int i=2;i<=sqr;i++)
{...
分类:
其他好文 时间:
2014-05-15 05:07:18
阅读次数:
261
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Unique Binary Search Trees
Total Accepted: 13478 Total
Submissions: 37858
Given n, how many structurally unique BST's (bin...
分类:
其他好文 时间:
2014-05-13 15:21:22
阅读次数:
291
给了你n个村庄把,然后m条路径,q个询问,问你两个点之间的最短距离
分析:由于按照题意来说本图是没有环的,所以求a,b的最近公共祖先 到他们的各自的距离之和就是 那个他们的最短路啦,用的是tarjan来做的,我的方法定义了一个dis数组来随时记录路径的长度,其它大神各有自己的神奇之法
#include
#include
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2014-05-13 07:48:39
阅读次数:
303
Problem Description
Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grav...
分类:
其他好文 时间:
2014-05-13 06:58:19
阅读次数:
523
首先,先创建一个安卓项目(我的版本是4.4.2的),名字为"短信发送器"
然后在res文件夹下找到layout文件夹,找到activity_main.xml或fragment_main.xml,在里面输入或拖拽按钮
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:too...
分类:
移动开发 时间:
2014-05-13 05:20:58
阅读次数:
383
著名开源软件网站(www.sourceforge.net)上面的开源项目,大部分使用的管理工具为cvs或svn。这两种软件的代表客户端程序是wincvs和tortoiseSVN。1.cvsCVS
(Concurrent Versions System) is a tool used by many ...
分类:
其他好文 时间:
2014-05-12 21:19:17
阅读次数:
371
The three hands of the clock are rotating every
second and meeting each other many times everyday. Finally, they get bored of
this and each of them wo...
分类:
其他好文 时间:
2014-05-12 05:20:21
阅读次数:
525
题目描述Jim is boss of a big company . There are so
many workers in his company that it will take a long time for his command send
to all of his workers ....
分类:
其他好文 时间:
2014-05-12 04:51:29
阅读次数:
307
题目链接:11038 - How Many O's?
题意:求[a.b]之间,0出现的次数。
思路:一开始一直往数位DP上去想,结果发现挺复杂的。。
把问题先转化为求0 - num的个数,在用到b的个数减去到a的个数
其实只要利用计数的乘法和加法原理,把数字对应的每一位的分成左右两边,利用乘法原理求总数,在用加法原理把所有的总数加起来就是总情况数。那么讨论一下分成两边的情况。举个例子
比...
分类:
其他好文 时间:
2014-05-11 13:16:13
阅读次数:
282