贪心 FZU 2013 A short problem】的更多相关文章

题目传送门 /* 题意:取长度不小于m的序列使得和最大 贪心:先来一个前缀和,只要长度不小于m,从m开始,更新起点k最小值和ans最大值 */ #include <cstdio> #include <algorithm> using namespace std; ; const int INF = 0x3f3f3f3f; int a[MAXN], sum[MAXN]; int main(void) //FZU 2013 A short problem { // freopen (&…
题目链接:https://vjudge.net/problem/FZU-2013  Problem 2013 A short problem Accept: 356    Submit: 1083Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description The description of this problem is very short. Now give you a string(length N), an…
A Short problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1716    Accepted Submission(s): 631 Problem Description According to a research, VIM users tend to have shorter fingers, compared…
A Short problem                                                          Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)                                                                                      Total Su…
HDU 4291 A Short problem(2012 ACM/ICPC Asia Regional Chengdu Online) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=4291 Description 给一个式子求结果.类似Fibonacci的公式g(n)=3*g(n-1)+g[n-2]. Input 给你n(1<=n<=1e18) Output 求g(g(g(n))) Sample Input 样例第一个就是0什么鬼,虽然没影响.…
A Short problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2711    Accepted Submission(s): 951 Problem Description According to a research, VIM users tend to have shorter fingers, compared…
A Short problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2461    Accepted Submission(s): 864 Problem Description According to a research, VIM users tend to have shorter fingers, compared…
A Short problem Problem's Link Mean: 给定一个n,求:g(g(g(n))) % 1000000007 其中:g(n) = 3g(n - 1) + g(n - 2),g(1) = 1,g(0) = 0 analyse: 很经典的题.由于n特别大,直接求肯定不行.由于所有的模运算都会出现循环节,可以求出循环节. 由于模数是固定的,可以在本地暴力求出循环节. 对于1000000007,求得循环节为222222224: 对于222222224,求得循环节183120:…
Description 题目描述 Recently, you have found your interest in string theory. Here is an interesting question about strings. You are given a string S of length n consisting of the first k lowercase letters. You are required to find two non-empty substrin…
http://acm.fzu.edu.cn/problem.php?pid=2037 思路:找规律,找出递推公式f[n]=f[n-1]*n+(n-1)!,另一个的结果也是一个递推,s[n]=s[n-1]+1/n; #include <cstdio> #include <cstring> #include <algorithm> #define maxn 1000010 #define ll long long using namespace std; ; ll f[ma…