自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 1、剑指 Offer 30. 包含min函数的栈

定义栈的数据结构,请在该类型中实现一个能够得到栈的最小元素的 min 函数在该栈中,调用 min、push 及 pop 的时间复杂度都是 O(1)实例MinStack minStack = new MinStack();minStack.push(-2);minStack.push(0);minStack.push(-3);minStack.min(); --> 返回 -3.minStack.pop();minStack.top(); --> 返回 0.mi

2021-12-01 14:49:16 680

原创 剑指 Offer 09. 用两个栈实现队列

用两个栈实现一个队列。队列的声明如下,请实现它的两个函数 appendTail 和 deleteHead ,分别完成在队列尾部插入整数和在队列头部删除整数的功能。(若队列中没有元素,deleteHead操作返回 -1 )示例 1:输入:["CQueue","appendTail","deleteHead","deleteHead"][[],[3],[],[]]输出:[null,null,3,-1]示例 2:输入:["CQueue","deleteHead","appendTail".

2021-12-01 11:09:43 73

原创 hduoj 2035 人见人爱AB

人见人爱A^B Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 61789Accepted Submission(s): 40936 Problem Description 求A^B的最...

2019-07-14 23:10:05 161

原创 hduoj 2034

人见人爱A-B Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 114519Accepted Submission(s): 31704 Problem Description 参加过上个...

2019-07-13 23:37:16 173

原创 hduoj 2033

人见人爱A+B Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 65596Accepted Submission(s): 42830 Problem Description HDOJ上面...

2019-07-12 23:11:14 142

原创 hduoj 2032

杨辉三角 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 103714Accepted Submission(s): 41673 Problem Description 还记得中学时候学...

2019-07-11 23:43:55 124

原创 hduoj 2031

进制转换 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 73539Accepted Submission(s): 39903 Problem Description 输入一个十进制数N...

2019-07-11 23:03:48 125

原创 hduoj 2030

汉字统计 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 67486Accepted Submission(s): 36293 Problem Description 统计给定文本文件中...

2019-07-10 23:53:57 132

原创 hduoj 2029

Palindromes _easy version Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 59599Accepted Submission(s): 36120 Problem Desc...

2019-07-10 23:35:48 156

原创 hduoj 2028

Lowest Common Multiple Plus Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 86645Accepted Submission(s): 36037 Problem De...

2019-07-09 23:35:42 228

原创 hduoj 2027

统计元音 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 109239Accepted Submission(s): 41682 Problem Description 统计每个元音字母...

2019-07-09 22:56:50 125

原创 hduoj 2026

首字母变大写 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 88184Accepted Submission(s): 47798 Problem Description 输入一个英文句...

2019-07-08 23:40:29 150

原创 hduoj 2025

查找最大元素 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 85025Accepted Submission(s): 44433 Problem Description 对于输入的每个...

2019-07-08 23:20:39 152

原创 hduoj 2024

C语言合法标识符 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 109573Accepted Submission(s): 41444 Problem Description 输入一个...

2019-07-07 23:42:51 211

原创 hduoj 2023

求平均成绩 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 190673Accepted Submission(s): 42200 Problem Description 假设一个班有n...

2019-07-07 23:17:12 149

原创 hduoj 2022

海选女主角 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 92163Accepted Submission(s): 40212 Problem Description potato老师...

2019-07-06 23:43:38 159

原创 hduoj 2021

发工资咯:) Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 91908Accepted Submission(s): 48756 Problem Description 作为杭电的老师...

2019-07-05 23:37:24 172

原创 hduoj 2021

2021 发工资咯:)Problem Description作为杭电的老师,最盼望的日子就是每月的8号了,因为这一天是发工资的日子,养家糊口就靠它了,呵呵但是对于学校财务处的工作人员来说,这一天则是很忙碌的一天,财务处的小胡老师最近就在考虑一个问题:如果每个老师的工资额都知道,最少需要准备多少张人民币,才能在给每位老师发工资的时候都不用老师找零呢?这里假设老师的工资都是正整数,单位元,人民...

2019-07-05 18:40:10 250

原创 hduoj 2020

绝对值排序 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 117645Accepted Submission(s): 55356 Problem Description 输入n(n&l...

2019-07-05 18:04:09 178

原创 hduoj 2019

数列有序! Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 130996Accepted Submission(s): 53856 Problem Description 有n(n&lt...

2019-07-03 18:33:59 279

原创 hduoj 2018 使用递归

#include <stdio.h> // 递推式 f(n) = n n<=4,f(n) = f(n-1) + f(n-3) n>4int cow(int n){ if(n <= 4) return n; else return cow(n-1) + cow(n-3);} int main(void)...

2019-07-02 19:21:55 198

原创 hduoj 2017

字符串统计 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 120524Accepted Submission(s): 65975 Problem Description 对于给定的一个...

2019-07-02 18:27:49 275

原创 hduoj 2016

数据的交换输出 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 153403Accepted Submission(s): 56593 Problem Description 输入n(n...

2019-07-01 18:35:20 245

原创 hduoj 2015

偶数求和 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 128109Accepted Submission(s): 52924 Problem Description 有一个长度为n(...

2019-06-30 21:32:45 195

原创 hduoj 2014

青年歌手大奖赛_评委会打分 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 126248Accepted Submission(s): 62140 Problem Description ...

2019-06-29 22:12:34 147

原创 hduoj 2013

蟠桃记 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 94018Accepted Submission(s): 69252 Problem Description 喜欢西游记的同学肯定...

2019-06-29 21:42:27 102

原创 hduoj 2012

素数判定 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 202034Accepted Submission(s): 71463 Problem Description 对于表达式n^2...

2019-06-29 18:33:31 121

原创 hduoj 2011

多项式求和 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 114970Accepted Submission(s): 64816 Problem Description 多项式的描述如...

2019-06-29 18:19:55 109

原创 hduoj 2010

#include <stdio.h>#include <math.h>int main(){ int m, n, i, t; while(scanf("%d %d", &m, &n)!= EOF){ if(m > n){ t = m; // 交换大小 m = n; n = t; ...

2019-06-27 18:32:53 140

原创 hduoj 2009

求数列的和 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 120435Accepted Submission(s): 71934 Problem Description 数列的定义如下...

2019-06-26 18:31:32 182

原创 hduoj 2007

平方和与立方和 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 243770Accepted Submission(s): 77254 Problem Description 给定一段连...

2019-06-26 17:48:33 135

原创 hduoj 2006

求奇数的乘积 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 138875Accepted Submission(s): 83826 Problem Description 给你n个整数...

2019-06-25 18:07:24 76

原创 hudoj 2005

第几天? Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 223127Accepted Submission(s): 77765 Problem Description 给定一个日期,输...

2019-06-25 17:58:58 109

原创 hduoj 2004

成绩转换 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 209649Accepted Submission(s): 91044 Problem Description 输入一个百分制的...

2019-06-25 17:39:35 153

原创 hduoj 2003

求绝对值 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 191552Accepted Submission(s): 93177 Problem Description 求实数的绝对值。...

2019-06-25 17:16:44 158

原创 hduoj 2002

计算球体积 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 236451Accepted Submission(s): 92511 Problem Description 根据输入的半径...

2019-06-24 21:34:02 151

原创 hduoj 2001

hduoj 2001#include <stdio.h>#include <math.h>int main(){ double x1, y1, x2, y2, t; while(scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2) != EOF){ t = sqrt((x1-x2)*(x1...

2019-06-24 21:22:35 139

原创 hduoj 2000

输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。Input输入数据有多组,每组占一行,有三个字符组成,之间无空格。Output对于每组输入数据,输出一行,字符中间用一个空格分开。Sample InputqweasdzxcSample Outpute q wa d sc x z#include <stdio.h>...

2019-06-24 21:10:19 146

原创 hdu2004成绩转换

#include &lt;cstdio&gt;int main() { int t; while (scanf("%d", &amp;t) != EOF) { if(t &lt; 0 || t &gt; 100) printf("Score is error!\n"); else if (t &g...

2018-05-27 10:50:25 125

原创 hdu 2003绝对值

Problem Description求实数的绝对值。 Input输入数据有多组,每组占一行,每行包含一个实数。 #include &lt;stdio.h&gt;int main(){ double r; while( scanf("%lf", &amp;r) != EOF){ if(r &gt; 0) printf("%.2lf\n", r); else printf...

2018-05-27 10:24:38 95

空空如也

空空如也

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

TA关注的人

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