Difference Between Primes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 860 Accepted Submission(s): 278 Problem Description All you know Goldbach conjecture.That is to say, Every even integer gr…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4715 Difference Between Primes Description All you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be expressed as the sum of two primes. Today, skywind present a new conje…
Difference Between Primes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 528 Accepted Submission(s): 150 Problem Description All you know Goldbach conjecture.That is to say, Every even inte…
http://acm.hdu.edu.cn/showproblem.php?pid=4715 Difference Between Primes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description All you know Goldbach conjecture.That is to say, Every even integer great…
#include <string.h> #include <stdio.h> const int maxn = 1000006; bool vis[1000006]; int pr[1000005]; int cnt = 1; int bs(int l, int r, int v) { int mid=(l+r)>>1; while(l < r) { if(pr[mid] < v) l = mid+1; else r = mid; mid= (l+r) &g…
Difference Between Primes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3339 Accepted Submission(s): 953 Problem Description All you know Goldbach conjecture.That is to say, Every even int…
题目链接 题意 : 给出一个 x 和 k 问有多少个 y 使得 x = f(y, k) - y .f(y, k) 为 y 中每个位的数的 k 次方之和.x ≥ 0 分析 : f(y, k) - y = x ≥ 0 满足条件的 y 最多不超过 10 位 这个并不知道怎么证.网上有很多结论证明.仔细推敲过后发现都是错的 可能需要手动打表模拟一下吧...... 变化一下式子 x = f(a, k) - a + f(b, k) - b * (1e5) x - f(a, k) + a = f(b, k)…
YaoYao has a company and he wants to employ m people recently. Since his company is so famous, there are n people coming for the interview. However, YaoYao is so busy that he has no time to interview them by himself. So he decides to select exact m i…
Difference Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 62 Accepted Submission(s): 19 Problem Description Little Ruins is playing a number game, first he chooses two positive integers y an…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1535 Problem Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all,…
find the most comfortable road Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3999 Accepted Submission(s): 1720 Problem Description XX 星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超…
GTW likes function 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5596 Description Now you are given two definitions as follows. f(x)=∑xk=0(−1)k22x−2kCk2x−k+1,f0(x)=f(x),fn(x)=f(fn−1(x))(n≥1) Note that φ(n) means Euler's totient function.(φ(n)is an…
Problem Description All you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be expressed as the sum of two primes. Today, skywind present a new conjecture: every even integer can be expressed as the difference of two pr…
题目链接: http://poj.org/problem?id=2607 Description A city is served by a number of fire stations. Some residents have complained that the distance from their houses to the nearest station is too far, so a new station is to be built. You are to choose t…
King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember history, King plans to play losephus problem in the parade gap.He calls n(1≤n≤5000) soldiers, counterclockwise in a circle, in label 1,2,3...n. The firs…
Difference of Languages Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 548764-bit integer IO format: %I64d Java class name: Main A regular language can be represented as a deterministic finite automaton…
Smallest Difference Description Given a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and writing them in some order. The remaining digits can be written down in some order to form a second…