给出一个字符串和若干个单词,问这些单词在字符串里面出现了多少次。单词前面为0表示这个单词可重叠出现,1为不可重叠出现。 Sample Input ab 2 0 ab 1 ab abababac 2 0 aba 1 aba abcdefghijklmnopqrstuvwxyz 3 0 abc 1 def 1 jmn Sample Output Case 1 1 1 Case 2
最近太忙太忙,只能抽时间写几道简单题。不过我倒是明白要想水平提高不看题解是最好的了。 A 我只能死找规律了,无法证明 int a[50002][2] ;vector< vector<int> > gmax , gmin ;int main(){int n , i , j , k , cmax , cmin ;while(cin>>n){/* g
传送门:【ZOJ】3889 Making Sequence 根据题意构造即可。ZOJ月赛我们抢的第二个FBwww my code: my~~code: #include <bits/stdc++.h>using namespace std ;typedef unsigned long long ULL ;const int MAXN = 205 ;ULL n , a , b , s ,
立方算法: #include<cstdio>#include<iostream>#include<algorithm>#include<cstring>#define M 505using namespace std;typedef long long LL;LL a[M],b[M];int dp[M][M];int main(){//freopen("in.txt","
2902.Ten drops 2960.Re-rejudge 3051.Playing Poker 3058.Circle and Ring 3073.Bernstein Polynomial 3150.Dareda? 3227.Perfect Cherry Blossom 3229.Shoot the Bulle
士兵有一个拿武器的重量的范围,给出几种武器的重量,问如何才能让更多的士兵装备武器,求出最大的人数 Description A war had broken out because a sheep from your kingdom ate some grasses which belong to your neighboring kingdom. The counselor of y