题目地址HDU 5347
无脑流神题,自行脑补,百度大法好。#include
#include
#include
#include
#include
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2015-08-05 10:30:13
阅读次数:
104
把表打出来一部分,轻松找到规律即可。
import java.util.Scanner;
import java.math.BigInteger;
import java.math.BigDecimal;
public class Main{
public static void main(String []args){
Scanner cin=new Scanner(Sy...
分类:
其他好文 时间:
2015-08-04 22:55:28
阅读次数:
166
Problem DescriptionXYZ is playing an interesting game called "drops". It is played on ar?cgrid. Each grid cell is either empty, or occupied by a water...
分类:
其他好文 时间:
2015-08-04 22:41:50
阅读次数:
121
Problem DescriptionIn ann?mmaze, the right-bottom corner is the exit (position(n,m)is the exit). In every position of this maze, there is either a0or ...
分类:
其他好文 时间:
2015-08-04 22:35:59
阅读次数:
221
MZL's xorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 249Accepted Submission(s): 187Problem Des...
分类:
其他好文 时间:
2015-08-04 22:23:57
阅读次数:
108
Problem DescriptionThere arenpeople andmpairs of friends. For every pair of friends, they can choose to become online friends (communicating using onl...
分类:
其他好文 时间:
2015-08-04 22:20:52
阅读次数:
108
OlympiadTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 631Accepted Submission(s): 436Problem Desc...
分类:
其他好文 时间:
2015-08-04 22:20:21
阅读次数:
95
题目链接:点击打开链接
题目大意:给出n个点,m条无向边,现在要求将无向边变为有向边,要保证每个点的出度和入度的差不超过1
直接进行搜索,对每个点进行出度和入度的判断,如果出度大,就先进行反向的搜索(每搜索一条边u,v就认为这是一条v到u的有向边),反之,进行正向搜索(每搜到一条边u,v认为这是一条u到v的有向边),一直搜索到找不到边能继续为止。
注意:
1、已经使用过的边为了防止再次被遍...
分类:
其他好文 时间:
2015-08-04 21:06:41
阅读次数:
114
题目链接:点击打开链接
题目大意:给出b1 = 'b' , b2 = 'a' , bi = b(i-1)b(i-2),将i-1和i-2链接起来,记录一个串的s[1~i] 和s[n-i+1~n]相同的话
Border,当i为最长是为LBorder,现在给让求在bn这个串上的前m个字符组成的子串的LBorder
通过计算可以发现,b字符串的前缀都是相同的,所以只要求出m的LBorder就行,...
分类:
其他好文 时间:
2015-08-04 21:06:35
阅读次数:
99
HDU 5351 MZL's Border(java 找规律)...
分类:
编程语言 时间:
2015-08-04 21:02:41
阅读次数:
143