ztr loves lucky numbers 题目链接: http://acm.hust.edu.cn/vjudge/contest/121332#problem/I Description ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits other than 4 and 7. For…
Problem Description ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits other than 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Lucky number is…
ztr loves math 题目链接: http://acm.hust.edu.cn/vjudge/contest/123316#problem/A Description ztr loves research Math.One day,He thought about the "Lower Edition" of triangle equation set.Such as n = x^2 - y^2. He wanted to know that ,for a given numb…
ztr loves math Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 896 Accepted Submission(s): 347 Problem Description ztr loves research Math.One day,He thought about the "Lower Edition" of…
Problem Description ztr loves research Math.One day,He thought about the "Lower Edition" of triangle equation set.Such as n=x2−y2. He wanted to know that ,for a given number n,is there a positive integer solutions? Input There are T test cases.…
ztr loves substring Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 219 Accepted Submission(s): 119 Problem Description ztr love reserach substring.Today ,he has n string.Now ztr want to kon…
NanoApe Loves Sequence 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5805 Description NanoApe, the Retired Dog, has returned back to prepare for the National Higher Education Entrance Examination! In math class, NanoApe picked up sequences once aga…
NanoApe Loves Sequence Ⅱ 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5806 Description NanoApe, the Retired Dog, has returned back to prepare for for the National Higher Education Entrance Examination! In math class, NanoApe picked up sequences on…
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 178 Accepted Submission(s): 93 Problem Description ztr love reserach substring.Today ,he has n string.Now ztr want to konw,can he take out exac…
题意:计算Bestcoder四题的得分. 思路:直接模拟,4项分数直接计算后输出.注意不要低于百分之40的分. //#include <bits/stdc++.h> #include <iostream> #include <cstdio> #define LL long long using namespace std; ; int a[N]; int b[N]; int cal() { ; ans=(/*(-a[])-b[]* >*/*(-a[])-b[]*:…
题目链接:点击传送 MG loves apple Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Problem Description MG is a rich boy. He has n apples, each has a value of V(0<=V<=9). A valid number does not contain a leading zero, and…
题目链接 Problem Description Kblack loves flags, so he has infinite flags in his pocket. One day, Kblack is given an chessboard and he decides to plant flags on the chessboard where the position of each flag is described as a coordinate , which means tha…
Manacher+二维费用多重背包 二进制优化 这题是一眼标算....先计算出每个长度的回文串有几种,然后用二维费用的多重背包判断是否有解. 多重背包做的时候需要二进制优化. #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; ; int N, p[maxn]; char str[maxn], b[maxn]; int cnt[…
传送门: http://acm.zcmu.edu.cn/JudgeOnline/problem.php?id=2177 2177: Lucky Numbers (easy) 时间限制: 2 Sec 内存限制: 256 MB提交: 42 解决: 21[提交][状态][讨论版] 题目描述 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard ou…
Problem description Petya loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits other than 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Lucky number…
Dylans loves tree Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1444 Accepted Submission(s): 329 Problem Description Dylans is given a tree with N nodes. All nodes have a value A[i].Nodes…
I - pog loves szh III Time Limit:6000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5266 Description Pog and Szh are playing games. Firstly Pog draw a tree on the paper. Here we define 1 as the root of the t…
DZY Loves Partition 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5646 Description DZY loves partitioning numbers. He wants to know whether it is possible to partition n into the sum of exactly k distinct positive integers. After some thinking he f…