hdu 5311(暴力)】的更多相关文章

Hidden String Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 52    Accepted Submission(s): 25 Problem Description Today is the 1st anniversary of BestCoder. Soda, the contest manager, gets a…
题意:今天是BestCoder一周年纪念日. 比赛管理员Soda有一个长度为n的字符串s. 他想要知道能否找到s的三个互不相交的子串s[l1..r1], s[l2..r2], s[l3..r3]满足下列条件: 1. 1≤l1≤r1<l2≤r2<l3≤r3≤n 2. s[l1..r1], s[l2..r2], s[l3..r3]依次连接之后得到字符串"anniversary". 特别注意:式子中红色符号!!! 思路:其实就是要在一个串中找可能存在的3个连续子串来构成这个&qu…
题意:要求在一个字符串中找出三段,然后能拼成一个固定的单词,问是否可行 BC周年庆第二题,我枚举了那个单词的切断位置,然后到给的字符串里分别找,然后就没有然后了``` #include<stdio.h> #include<string.h> #include<algorithm> #include<math.h> using namespace std; ]; ]=" anniversary"; ; bool check(int a,in…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5311 Hidden String Description Today is the 1st anniversary of BestCoder. Soda, the contest manager, gets a string s of length n. He wants to find three nonoverlapping substrings $s[l_1..r_1], s[l_2..r_2…
http://acm.hdu.edu.cn/showproblem.php?pid=5311 Hidden String Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1499    Accepted Submission(s): 534 Problem Description Today is the 1st anniversar…
链接: http://acm.hdu.edu.cn/showproblem.php?pid=5311 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1462    Accepted Submission(s): 521 Problem Description Today is the 1st anniversary of BestC…
Beautiful Now Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1876    Accepted Submission(s): 707 Problem Description Anton has a positive integer n, however, it quite looks like a mess, so he…
Fxx and string Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 507    Accepted Submission(s): 224 Problem Description Young theoretical computer scientist Fxx get a string which contains lowerc…
思路:用map将每个字符串与一个数字进行对应,然后暴力统计就好了 #include<cstring> #include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<map> #include<vector> #include<string> #define Maxn 2010 using namespace st…
http://acm.hdu.edu.cn/showproblem.php?pid=4952 给定x,k,i从1到k,每次a[i]要是i的倍数,并且a[i]大于等于a[i-1],x为a0 递推到下一个a==之前的a即可跳出循环 #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <string> #include <queue&g…