Description On the evening of 3 August 1492, Christopher Columbus departed from Palos de la Frontera with a few ships, starting a serious of voyages of finding a new route to India. As you know, just in those voyages, Columbus discovered the America…
选课时间(题目已修改,注意读题) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2254 Accepted Submission(s): 1791 Problem Description 又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合.你来帮帮他吧.(xhd认为一样学分的课没区别)…
搞不懂为什么DFS的写法崩了,然后乱暴力,因为题意不是很懂... 主要还是读题吧(很烦 #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef pair<int,int>PII; const double eps=1e-5; const double pi=acos(-1.0); //const int mod=1e9+7;…
Problem Description 时间过的好快,一个学期就这么的过去了,xhd在傻傻的看着表,出于对数据的渴望,突然他想知道这个表的时针和分针的夹角是多少.现在xhd知道的只有时间,请你帮他算出这个夹角. 注:夹角的范围[0,180],时针和分针的转动是连续而不是离散的. Input 输入数据的第一行是一个数据T,表示有T组数据. 每组数据有三个整数h(0 <= h < 24),m(0 <= m < 60),s(0 <= s < 60)分别表示时.分.秒. Out…
代码: #include<cstdio> #include<cstring> using namespace std; int main() { int t; scanf("%d",&t); while(t--) { int n,k; int a[9],b[9]; scanf("%d%d",&n,&k); for(int i=1; i<=k; i++) { scanf("%d%d",&…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2274 Magic WisKey Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 568 Accepted Submission(s): 323 Problem Description On New Year Festival, Liu…
Fang Fang Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5455 Description Fang Fang says she wants to be remembered.I promise her. We define the sequence F of strings.F0 = ‘‘f",F1 = ‘‘ff",F2 = ‘‘cff",F…
主题链接: http://acm.hdu.edu.cn/showproblem.php?pid=4016 Magic Bitwise And Operation Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 1315 Accepted Submission(s): 504 Problem Description Given n…
Count primes 题目连接: http://acm.split.hdu.edu.cn/showproblem.php?pid=5901 Description Easy question! Calculate how many primes between [1...n]! Input Each line contain one integer n(1 <= n <= 1e11).Process to end of file. Output For each case, output…
Rower Bo 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5761 Description There is a river on the Cartesian coordinate system,the river is flowing along the x-axis direction. Rower Bo is placed at (0,a) at first.He wants to get to origin (0,0) by boa…
Magic Pen 6 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 582 Accepted Submission(s): 224 Problem Description In HIT, many people have a magic pen. Lilu0355 has a magic pen, darkgt has a ma…
http://acm.hdu.edu.cn/showproblem.php?pid=3183 A Magic Lamp Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2556 Accepted Submission(s): 999 Problem Description Kiki likes traveling. One day…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1203 I NEED A OFFER! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33303 Accepted Submission(s): 13470 Problem Description Speakless很早就想出国,现在…