题目地址:codeforces #pi (DIV2) E
题目很水。。就是先求两边最短路,然后把可能为最短路的边挑出来,然后判断是否yes只需要转化成无向图跑一遍tarjan,找出割边,割边就是yes,然后剩下的边就让它的值为最短路-1就行了,如果-1后变成了非正数,就是no.
但是!!!居然卡spfa!!那是不是说cf以后就不能用可以卡的算法了。。完全可以出组数据来卡这些算法。。。比如spfa...
分类:
其他好文 时间:
2015-08-07 20:19:51
阅读次数:
145
首先要知道,div是块级元素,在页面中独占一行,自上而下排列,也就是传说中的流。如下图: 可以看出,即使div1的宽度很小,页面中一行可以容下div1和div2,div2也不会排在div1后边,因为div元素是独占一行的。 注意,以上这些理论,是指标准流中的div。 小菜认为,无论多么复杂的布局.....
分类:
Web程序 时间:
2015-08-04 17:13:33
阅读次数:
102
Problem Statement
Bear Limak was chilling in the forest when he suddenly found a computer program. The program was a correct implementation of MergeSort. Below you can find the program in ...
分类:
编程语言 时间:
2015-08-02 21:45:31
阅读次数:
181
A题,熊孩子测视力,水题,题意就是判断一下两个数对应位不相同的数字有多少个。#includeusing namespace std;class BearCheats{ public: string eyesight(int A, int B){ int d...
分类:
其他好文 时间:
2015-08-02 11:26:07
阅读次数:
125
BearPlaysDiv2Problem StatementLimak is a little bear who loves to play. Today he is playing by moving some stones between three piles of stones. Initi...
分类:
其他好文 时间:
2015-08-02 06:21:20
阅读次数:
141
#include#include#include#includeusing namespace std;class BearCheats{public: string eyesight(int A, int B){ char t[256]; string s1; ...
分类:
其他好文 时间:
2015-08-02 00:55:05
阅读次数:
141
题目:给两个字符串a、b,问从a中删去若干字符后最多可以得到多少个b串的重复串(bb...b的形式,b的长度不超过100),其中a串是由一个长度不超过100的字符串s重复k次得到的思路: 暴力匹配a和b,由于s,b的长度都不超过100,标记每次匹配后a串指针的位置对len(s)的模,那么最多有100...
分类:
其他好文 时间:
2015-07-30 02:06:17
阅读次数:
127
Problem Statement
Bob is going to create a graph with N nodes. The graph will be constructed in two steps. First, Bob will take N isolated vertices, label them 1 through N and color each of them us...
分类:
其他好文 时间:
2015-07-26 22:44:29
阅读次数:
261
#include
#include
using namespace std;
/*B*/
/*注意要开长整型.........没别的说的*/
/*
int main()
{
long long int m;
scanf("%lld",&m);
if(m
long long int n=m;
int q=0;
wh...
分类:
其他好文 时间:
2015-07-26 09:49:30
阅读次数:
123
SRM 661-Medium: BridgeBuildingDiv2
Problem Statement
You have two rows of nodes. Each row contains N nodes, numbered 0 through N-1 from the left to the right.
Within each row, adjacent nodes...
分类:
其他好文 时间:
2015-07-26 00:35:52
阅读次数:
290