04 2015 档案
摘要:#include#include#include#include#include#include#include#include#include#define LL long longusing namespace std;const int MAXN=10;const int INF=0x3f3f...
阅读全文
摘要:#include#include#include#include#include#include#include#include#include#define LL long longusing namespace std;const int MAXN=10;const int INF=0x3f3f...
阅读全文
摘要:#include#include#include#include#include#include#include#include#include#define LL long longusing namespace std;int map[10][10];int vis[10][10];int a[...
阅读全文
摘要:#include#include#include#includeusing namespace std;char a[1000+100];int vis[1000+100];int n;int cnt;int ok;bool huiwen(){ int l=0; int r=strlen...
阅读全文
摘要:#include#include#include#include#include#include#include#include#include#define LL __int64using namespace std;const int MAXN=30;char str[MAXN];int wor...
阅读全文
摘要:题意:思路:#include#include#include#include#include#include#includeusing namespace std;int a[35],n,m;int main(){ while(~scanf("%d%d",&n,&m)) { ...
阅读全文
摘要:题意:思路:#include#include#include#include#include#include#include#include#include#define LL __int64using namespace std;const int MAXN=1000+5;const int IN...
阅读全文
摘要:题意:思路:#include#include#include#include#include#include#include//const int maxn;using namespace std;char s[1000];int num[5];int main(){ int n; in...
阅读全文
摘要:#include#include#include#include#include#include#includeusing namespace std;int a[1000000+10];char str[1000000+10];int main(){ int n; int i,j,k;...
阅读全文
摘要:#include#include#include#include#include#include#include#include#include#define LL __int64using namespace std;const int MAXN=100000+5;const int MAX=10...
阅读全文
摘要:题意:给定一组数,取两个数,使得gcd最大c思路:#include#include#include#includeusing namespace std;#define ll __int64//#define ll long longint vis[100000+100];int gcd(int a...
阅读全文
摘要:题意: 一共有n天 每天西瓜售价为dp[i]元 该天的西瓜能吃v[i]天 而且这天如果买了西瓜之前的西瓜就要扔掉 问每天都吃到西瓜的最小花费是多少思路: 从最后一天开始dp最小花费 并用线段树单点更新来维护#include #include #include #include using names...
阅读全文
摘要:题意:一共要吃n顿饭 公款m元 如果公款大于等于饭局所需费用 就全用公款 如果小于就自费 求最后能用的公款为多少思路: dfs(i - 1, val + dp[i]); dfs(i - 1, val);#include #include #include #include using namesp...
阅读全文
摘要:题意:给出n个宽度为1 高度为hi的长方形 问能圈出的最大长方形面积多大思路:http://blog.csdn.net/dgq8211/article/details/7740610#include#include#include#include#includeusing namespace ...
阅读全文
摘要:题意:输入一个数x 从小到大输出所有满足 (k*leny+y)*x=y*10+k 的k*leny+y思路:因为x 为浮点数 所以等式两边都要乘 1e4 将等式化为 k(leny*x-1)*1e4=y(1e5-x*1e4) 可以通过枚举 len k 来求出y是否存在 存在时位数又是否符合条...
阅读全文
摘要:题意:给出若干数字 如果能被6整除 输出BEER!! 否则输出 BOOM!!思路:用三维数组存下0到9 暴力出每个数的值 求出结果 (这题有点坑在于 1 数字可能不存在 2 数字的数量不确定)#include#include#include#includeusing namespace...
阅读全文