杭电水题

杭电OJ上的水题:C语言程序设计练习

题目如下:

链接:

http://acm.hdu.edu.cn/showproblem.php?pid=2001

注:pid=后面可以为2000 - 2050中的任何一个(对应50道题目)

另外也可以做1000之后的(按顺序做,从1000开始把,1000开头的都蛮简单的)

原文地址:https://www.cnblogs.com/wyb666/p/10909202.html

时间: 2024-08-06 00:47:17

杭电水题的相关文章

杭电dp题集,附链接

Robberies 点击打开链接 背包;第一次做的时候把概率当做背包(放大100000倍化为整数):在此范围内最多能抢多少钱  最脑残的是把总的概率以为是抢N家银行的概率之和- 把状态转移方程写成了f[j]=max{f[j],f[j-q[i].v]+q[i].money}(f[j]表示在概率j之下能抢的大洋); 正确的方程是:f[j]=max(f[j],f[j-q[i].money]*q[i].v)  其中,f[j]表示抢j块大洋的最大的逃脱概率,条件是f[j-q[i].money]可达,也就是

acm入门 杭电1001题 有关溢出的考虑

最近在尝试做acm试题,刚刚是1001题就把我困住了,这是题目: Problem Description In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n. Input The input will consist of a series of integers n, one integer per line Output For each case, output SUM(n) in one line

小试牛刀-搜索基础入门(杭电五题)

hdu 1241 Oil Deposits 水题,BFS,判断区域的块数. 代码清单: #include<queue> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; typedef pair<int,int>P; int m,n; char s[105][105]; int xy[8][2]=

杭电算法题 HDU 1000-1004

h1,h2,h3,h4,h5,h6,p,blockquote { margin: 0; padding: 0 } body { font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif; font-size: 13px; line-height: 18px; color: #737373; background-color: white; margin: 10px

动态规划解决杭电OJ1080题——LCS的变种

首先上题目: Human Gene Functions Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2570    Accepted Submission(s): 1451 Problem Description It is well known that a human gene can be considered as a se

杭电一水题(DFS)Untitled

Problem Description There is an integer a and n integers b1,…,bn. After selecting some numbers from b1,…,bn in any order, say c1,…,cr, we want to make sure that a mod c1 mod c2 mod… mod cr=0 (i.e., a will become the remainder divided by ci each time,

杭电二分题

Description Now, here is a fuction: F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100) Can you find the minimum value when x is between 0 and 100. Input The first line of the input contains an integer T(1<=T<=100) which means the number of te

Dijk入门(杭电2544题)

#include<iostream> #include<cstring> using namespace std; #define INF 0x3f3f3f3f int n,m; int map[105][105]; int vis[105]; int stemp[105]; int dijk(){ memset(vis,0,sizeof(vis)); vis[1]=1; //标记第一个已选 memset(stemp,0,sizeof(stemp)); int min; int f

【STL】【HDU2024】C语言合法标识符【水题】

链接:http://acm.hdu.edu.cn/showproblem.php?pid=2024 既然要求了全体同学都要刷完杭电100题,那我还是以身作则,也都给刷完吧~~~ 这些水题真的是都快刷吐了   不知道刷过多少道了  就当做查缺补漏吧 不过还真的发现了一个有意思的题目,用普通的办法判断真的是太麻烦了,真是一个体力活 还没注意过这几个库函数  用起来才发现这么简洁 getline(): getline()函数使用详解 头文件 C++<cctype> (C语言使用<ctype.h