自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 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 89

原创 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 85

原创 hdu1236 排名

排名http://acm.hdu.edu.cn/showproblem.php?pid=1236#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;#define N 1005int que[15]; struct node{ char name[25]; int num; int

2021-05-13 19:37:38 63

原创 hdu 2037 今年暑假不AC

今年暑假不AChttp://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 89

原创 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 79

原创 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 57

原创 hdu 1009 FatMouse‘ Trade

FatMouse’ Tradehttp://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 82

原创 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 61

原创 hdu 1098 Ignatius‘s puzzle

Ignatius’s puzzlehttp://acm.hdu.edu.cn/showproblem.php?pid=1098#include<cstdio>using namespace std;int main(){ int k; while (scanf("%d", &k) == 1) { k %= 65; int a; for (a = 0;a <= 64;a++) { if ((18 + a * k) % 65 == 0) { pr

2021-04-13 19:47:58 67

原创 hdu 1060 Leftmost Digit

Leftmost Digithttp://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 88

原创 hdu 2199 Can you solve this equation?

Can you solve this equation?http://acm.hdu.edu.cn/showproblem.php?pid=2199#include<stdio.h>using namespace std;#define f(x) (x*(x*(x*(8*x+7)+2)+3)+6)double solve(double l, double r, double val){ double mid; while (r - l > 1e-7) { mid = (

2021-04-13 18:49:06 87

原创 hdu 2899 Strange fuction

Strange fuctionhttp://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 101

原创 hdu 2035 人见人爱A^B

人见人爱A^Bhttp://acm.hdu.edu.cn/showproblem.php?pid=2035#include<stdio.h>int main(){ int a, b, ans, temp; while (scanf("%d %d", &a, &b)) { if (a == 0 && b == 0) return 0; ans = 1; temp = a % 1000; while (b) { if (temp ==

2021-03-31 19:38:39 51

原创 hdu 1097 A hard puzzle

A hard puzzlehttp://acm.hdu.edu.cn/showproblem.php?pid=1097#include<stdio.h>int f[10][6] = { {1,0,0},{1,1},{1,2,4,8,6,2},{1,3,9,7,1},{1,4,6,4},{1,5,5}, {1,6,6},{1,7,9,3,1},{1,8,4,2,6,8},{1,9,1} };int c[10] = { 1,1,4,4,2,1,1,4,4,2 };int s[10] =

2021-03-31 15:29:14 47

原创 hdu 1021 Fibonacci Again

Fibonacci Againhttp://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 53

原创 hdu 1019 Least Common Multiple

Least Common Multiplehttp://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 54

原创 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 61

原创 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 44

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除