The first place of 2^n Problem Description LMY and YY are mathematics and number theory lovers. They like to find and solve interesting mathematic problems together. One day LMY calculates 2n one by one, n=0, 1, 2,- and writes the results on a sheet…
H - National Day Parade Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 3687 Appoint description:  System Crawler  (2014-11-08) Description There are n×n students preparing for the National Day…
http://acm.hdu.edu.cn/showproblem.php?pid=1576 写了个ex_gcd的模板...太蠢导致推了很久的公式 这里推导一下: 因为 1 = BX + 9973Y        ----------------① 且 n = Bk - floor(A/9973) * 9973      ----------------② ①*n即    n = BnX + nY * 9973 那么 k = nX k = A/B ...而k%9973为所求 (n*X)%9973…
HDU - 4788 Hard Disk Drive Time Limit:1000MS   Memory Limit:32768KB   64bit IO Format:%I64d & %I64u [Submit]  [Go Back]  [id=47572" rel="nofollow">Status]   Description Yesterday your dear cousin Coach Pang gave you a new 100MB hard…
郑厂长系列故事——逃离迷宫 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 961    Accepted Submission(s): 490 Problem Description 郑厂长没变 还是那个假厂长真码农 改变的是业余爱好 他现在不研究象棋,改玩游戏了! 最近,郑厂长爱上了逃离迷宫这个游戏,他日日夜夜的玩,就是想达到自己的…
题意:有n个数字,带入10000 - (100 - ai) ^ 2公式得到n个数,输出n个数中频率最大的数,如果有并列就按值从小到大都输出输出,如果频率相同的数字是全部的n个数,就输出Bad....题解:统计数字个数和频率,排序后输出. Sample Input36100 100 100 99 98 1016100 100 100 99 99 1016100 100 98 99 99 97 Sample OutputCase #1:10000Case #2:Bad MushroomCase #3…
N皇后问题 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6905    Accepted Submission(s): 3128 Problem Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上.你的任务是,对于给定的N,求出有…
MU Puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 134    Accepted Submission(s): 71 Problem Description Suppose there are the symbols M, I, and U which can be combined to produce strings…
Hehe Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 33    Accepted Submission(s): 22 Problem Description As we all know, Fat Brother likes MeiZi every much, he always find some topic to talk wi…
6322.Problem D. Euler Function 题意就是找欧拉函数为合数的第n个数是什么. 欧拉函数从1到50打个表,发现规律,然后勇敢的水一下就过了. 官方题解: 代码: //1004-欧拉函数水题 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; typede…