![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
被迫学习的懒蛋
这个作者很懒,什么都没留下…
展开
-
hdu 2041 超级楼梯
超级楼梯 http://acm.hdu.edu.cn/showproblem.php?pid=2041 #include<bits/stdc++.h> using namespace std; int main() { int m, n, ct[50], i; ct[1] = ct[2] = 1; for (i = 3;i <= 40;i++) { ct[i] = ct[i - 1] + ct[i - 2]; } scanf("%d", &n); while (n-原创 2021-05-16 16:33:42 · 82 阅读 · 0 评论 -
hdu 2044 一只小蜜蜂
一只小蜜蜂 http://acm.hdu.edu.cn/showproblem.php?pid=2044 #include<bits/stdc++.h> using namespace std; int main() { int a, b, n, i; long long ct[51];//方案数要用longlong定义,int不够用,会出错 ct[1] =1, ct[2] = 2; for (i = 3;i <= 50;i++) { ct[i] = ct[i - 1] + c原创 2021-05-16 16:32:10 · 70 阅读 · 0 评论 -
hdu1236 排名
排名 http://acm.hdu.edu.cn/showproblem.php?pid=1236 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define N 1005 int que[15]; struct node { char name[25]; int num; int原创 2021-05-13 19:37:38 · 53 阅读 · 0 评论 -
hdu 2037 今年暑假不AC
今年暑假不AC http://acm.hdu.edu.cn/showproblem.php?pid=2037 #include<bits/stdc++.h> using namespace std; struct fwc { int s, e; }p[101]; bool cmp(fwc x, fwc y) { return x.e < y.e; } int main() { int n,i,a,b; while (scanf("%d", &n) != EOF) { i原创 2021-05-11 20:51:51 · 76 阅读 · 0 评论 -
hdu 1050 Moving Tables
Moving Tables 搬桌子 http://acm.hdu.edu.cn/showproblem.php?pid=1050 #include<bits/stdc++.h> using namespace std; int main() { int i, j, n; int rm[401]; int s, t; int T,p[201]; scanf("%d", &T); while (T--) { scanf("%d", &n); for (i =原创 2021-05-11 20:04:53 · 69 阅读 · 0 评论 -
hdu 1052 Tian Ji -- The Horse Racing
Tian Ji – The Horse Racing 田忌赛马 http://acm.hdu.edu.cn/showproblem.php?pid=1052 #include<bits/stdc++.h> using namespace std; int cmp(int a, int b) { return a > b; } int main() { int a[1009], b[1009]; int n; while (scanf("%d", &n原创 2021-05-10 20:35:53 · 52 阅读 · 0 评论 -
hdu 1009 FatMouse‘ Trade
FatMouse’ Trade http://acm.hdu.edu.cn/showproblem.php?pid=1009 #include<bits/stdc++.h> using namespace std; struct sFJ{ int f,j; double fj; }FJ[1010]; bool cmp(sFJ x,sFJ y){ return x.fj>y.fj; } double ans; int main() { int m,n,id,i; while(sc原创 2021-05-09 21:32:11 · 70 阅读 · 0 评论 -
L1-050 倒数第N个字符串 (15 分)
L1-050 倒数第N个字符串 (15 分) 给定一个完全由小写英文字母组成的字符串等差递增序列,该序列中的每个字符串的长度固定为 L,从 L 个 a 开始,以 1 为步长递增。例如当 L 为 3 时,序列为 { aaa, aab, aac, …, aaz, aba, abb, …, abz, …, zzz }。这个序列的倒数第27个字符串就是 zyz。对于任意给定的 L,本题要求你给出对应序列倒数第 N 个字符串。 输入格式: 输入在一行中给出两个正整数 L(2 ≤ L ≤ 6)和 N(≤10^5)。 输原创 2021-04-21 20:31:00 · 54 阅读 · 0 评论 -
hdu 1060 Leftmost Digit
Leftmost Digit http://acm.hdu.edu.cn/showproblem.php?pid=1060 #include<cstdio> #include<cmath> using namespace std; int solve(int n) { double res = n * log10(n); return pow(10, res - floor(res)); } int main() { int n,t; scanf("%d", &原创 2021-04-13 19:28:23 · 63 阅读 · 0 评论 -
hdu 2899 Strange fuction
Strange fuction http://acm.hdu.edu.cn/showproblem.php?pid=2899 #include<stdio.h> using namespace std; #define f(x,y) (x*(x*(x*(x*(x*(x*(6*x+8)))+7)+5)-y)) double solve(double l, double r, double y) { double lm, rm; while (r - l > 1e-7) { lm =原创 2021-04-13 18:35:54 · 76 阅读 · 0 评论 -
hdu 1021 Fibonacci Again
Fibonacci Again http://acm.hdu.edu.cn/showproblem.php?pid=1021 #include<cstdio> int main() { // a[n]= 1, 2, 0, 2, 2, 1, 0, 1 int n; while (scanf("%d", &n) != 1) { if (n % 4 == 2)printf("yes\n"); else printf("no\n"); } return 0; }原创 2021-03-30 20:32:20 · 47 阅读 · 0 评论 -
hdu 1019 Least Common Multiple
Least Common Multiple http://acm.hdu.edu.cn/showproblem.php?pid=1019 #include<cstdio> int gcd(int x, int y) { if (!y) return x; else return gcd(y, x % y); } int main() { int t; scanf("%d", &t); int m; while (t--) { scanf("%d", &m);原创 2021-03-30 20:06:59 · 43 阅读 · 0 评论 -
hdu 1108 最小公倍数
HDOJ 1108 #include<stdio.h> int gcd(int x,int y){ if(y==0) return x; return gcd(y,x%y); } int main(){ int x,y; while(scanf("%d %d",&x,&y)!=EOF){ printf("%d\n",x*y/gcd(x,y)); } return 0; }原创 2021-03-28 18:05:20 · 54 阅读 · 0 评论 -
hdu 1001 Sum Problem
HDOJ 1001 #include<stdio.h> int main() { int a; while (scanf("%d\n", &a)!=EOF) { int sum = 0, i = 1; for (;i <= a;i++) { sum += i; } if (i > a) printf("%d\n\n", sum); } return 0; }原创 2021-03-28 17:57:40 · 37 阅读 · 0 评论