自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Poj——Symmetric Order

题目In your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing a program whose output is a list of names in nondescending order by length (so that ...

2019-03-05 22:08:18 133

原创 Poj3299——Humidex

题目The humidex is a measurement used by Canadian meteorologists to reflect the combined effect of heat and humidity. It differs from the heat index used in the United States in using dew point rath...

2019-03-05 21:58:14 303

原创 Poj1003------Hangover

题目How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the t...

2019-03-05 21:45:53 175

原创 【蓝桥】基础vip——矩形面积交

目录题目代码思路题目代码#include <iostream>#include <cmath>#include <iomanip>using namespace std;int main(){ double x1,y1,x2,y2,x3,y3,x4,y4; cin>>x1>>y1&g...

2019-01-29 05:01:42 125

原创 【蓝桥】基础vip_龟兔赛跑预测

目录题目代码思路题目代码#include <iostream>using namespace std;int main(){ int v1,v2,t,s,l; cin>>v1>>v2>>t>>s>>l; int time_r=0,time_g=0 ;//time是兔子...

2019-01-25 16:41:20 218

原创 【蓝桥】基础vip—sine之舞

目录题目代码思路题目An=sin(1–sin(2+sin(3–sin(4+...sin(n))...)Sn=(...(A1+n)A2+n-1)A3+...+2)An+1输入N(<201),输出相应表达式Sn代码#include <iostream>using namespace std;int i=1;int j=0;void A(in...

2019-01-25 16:25:16 79

原创 【蓝桥】基础vip—17矩阵乘法

目录题目代码思路题目给定一个N阶矩阵A,输出A的M次幂(M是非负整数)例如:A  =1  23  4A的2次幂7  1015  22输出共N行,每行N个整数,表示A的M次幂所对应的矩阵。相邻的数之间用一个空格隔开 代码#include <iostream>using namespace std;int main(){ int...

2019-01-25 15:47:14 102

原创 [蓝桥]基础vip_数的读法

目录题目代码思路    题目代码#include <iostream>#include <string.h>using namespace std;void yuzhi(int *n,int l)//对n预置{ if(l%4==0&&l!=0) *n=4; if(l%4==...

2019-01-25 15:04:11 372 2

原创 [蓝桥]基础vip_FJ的字符串

题目:FJ在沙盘上写了这样一些字符串:A1  =  “A”A2  =  “ABA”A3  =  “ABACABA”A4  =  “ABACABADABACABA”…  …你能找出其中的规律并写所有的数列AN吗? 规律:以字母表顺序,选取正序下一个字母作为连接字母,重复上一次的字符串1:A2:A+B+A3:ABA+C+ABA..........以此类推...

2019-01-25 12:21:02 92

原创 蓝桥题库初级题

蓝桥杯1.A+B问题数据范围:-10000 <= A, B <= 10000源码 int a, b; cin >> a >> b; cout << a + b;各类型数据范围如果要做有关大数的计算,比如100~200位的大数,应该用字符数组,或者整形数组保存这个大数再进行相关...

2019-01-19 11:36:08 446

原创 有序单链表的合并

记录一下,我发现自己自从开始学数据结构,一个很大很大的问题就是,例如一个表中的结点*s,s和s->next交叉出现,以及什么时候对s->next判空,什么时候对s判空,都是需要结合你自己的算法步骤来选择的,而不去模拟清楚这个过程,就会出现很大的问题,尤其是做一些比较复杂,然后需要对多个条件进行判断的题目,更是容易自己把自己弄混。自查很难,所以每一步都要想清楚最好手边都要放一本草稿本...

2018-10-07 18:57:37 143

原创 单链表

刚学数据结构,想要自己实现每一个具体的算法,从po单链表开始吧,还有排序、删除、析构函数有一些问题依旧po上来!催自己写完一把!//代码中所有用到指针的地方都必须是指针#include <iostream>using namespace std;template <typename T>struct LinkList{ T data; L...

2018-09-23 21:47:41 81

原创 一些杂杂的记录

for(i=0;a[i]!='\0';i++) { }1.比如上面这一个程序,循环结束之后,a[i]会为空,也就是,i是计数到限制条件那个一个数,而不是刚好不计卡在前一个数 2. 'template<class T> class LinkListClass' used without template parameters|无模板参数使用...

2018-09-16 14:47:31 191

原创 分解质因数

老师布置了一道题目,叫分解质因数比如【样例输入】90【样例输出】90=2*3*3*5#include <iostream>using namespace std;bool fun(int i){ int j; for(j=2;j<i;j++) { if(i%j==0) { ret...

2018-09-12 20:38:43 133

原创 杭电oj1040

这道题暴力就好了,但是输出格式需要很注意,题目中,两两间隔的数字会有空格,但是如果没有间隔,最后一个数字后面是不带空格的 #include <iostream>using namespace std;int main(){ int n; cin>>n; int p; for(int i=0;i<n;i++) {...

2018-08-07 14:26:23 942

原创 杭电oj1037

*题目Problem DescriptionBoudreaux and Thibodeaux are on the road again . . ."Boudreaux, we have to get this shipment of mudbugs to Baton Rouge by tonight!""Don't worry, Thibodeaux, I already check...

2018-08-07 14:22:44 335

原创 杭电oj1032

题目:Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm w...

2018-08-07 14:11:27 1495

原创 杭电oj1021

题目就是在斐波那契数列的基础上,如果这个值可以整除3,就是yes,不然则no对于时间复杂度有比较高的要求开始下意识的写了递归做法,一边也觉得奇怪,这个一定不会只考察一个入门级的递归,但是后来这个递归,给找规律带来了很好的启发,有点像第一小题和第二小题的感觉#include <iostream>using namespace std;int f(int n){ ...

2018-08-02 12:46:01 538

原创 杭电oj1017

个人觉得这个看懂题目就不是很难,但是我看懂题目就很难。。Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem contains multip...

2018-08-01 20:53:18 895

原创 杭电oj1013

题目大意是,给出一个数,分解出它的每一数位,将各数位相加,若相加后的数不是一个个位数,那么对这个由数位相加得来的数,当作新的操作数,进行同样的操作,直至数位和为个位数为止,输出这个个位数,遇0代表程序终止 开始看它用的都是integer这个描述,我以为这个不会牵扯到什么范围过大的问题,先写 了一版这样的,很快就wrong answer 了百度说这个由于范围问题要用字符数组来做#i...

2018-08-01 15:52:23 929

原创 杭电oj1012&c++控制精度的几种做法

这道题注意控制精度,我是一个个手动区分的精度,不知道还会不会有什么新的做法#include <iostream>#include <iomanip>using namespace std;long double f(int i){ if(i==0||i==1) { return 1; } else { ...

2018-07-28 19:33:05 282

原创 关于杭电网上一些找到的好帖,希望能被更多人知道hhh

因为是新手。。只学了语言课,所以太多东西做起来很吃力,瞎做题的话,遇上难题会很消磨人,所以,来一个acm分类,感谢菜大暗博主http://blog.sina.com.cn/s/blog_889dc07b0101c969.html常见oj评判结果对照表https://www.cnblogs.com/madonion/articles/2271913.html各大oj平台介绍,比较以及...

2018-07-28 18:14:30 111

原创 杭电A+B问题合集1001、1089--1096

A+B问题怎么那么多!虽然他们都很简单,大概是刚学的时候做的题目,但是对于这种有类别的还是控制不住的记下来!所以。。开始吧1001,不说了,多组输入1089  题目说,很简单,和之前的A+B都是一母同胎,做法都没差#include <iostream>using namespace std;int main(){ int a,b; while(c...

2018-07-27 11:26:13 252

原创 杭电oj1008

题目大意是,上电梯,停留花费5s,上一层花费6s,下一层花费4s,中间掠过的不计时间,直接写即可#include <iostream>using namespace std;int main(){ int n; while(cin>>n) { if(n==0) { } el...

2018-07-26 11:28:49 397

原创 杭电oj1005

#include <iostream>using namespace std;int f(int A,int B,int n){ //f(A,B,n) = ((A * f(A,B,(n - 1)) + B * f(A,B,(n - 2))) % 7); if(n>2)//(n!=1||n!=2) { return ((A * f(A...

2018-07-26 10:00:03 343 1

原创 杭电oj1004

题目就不po了。。po一下代码好了,我感觉我的做法特别复杂,可能比较暴力吧。。#include <iostream>#include <string>//自己的编译软件不需要这行,杭电的编译器是什么我很想弄懂using namespace std;int main(){ int a; while(cin>>a) { if(a==...

2018-07-26 07:06:17 507

原创 杭电oj1001

*题目       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    ...

2018-07-23 18:31:07 535

原创 杭电oj1000

*1000题目Calculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line*解答:错误:#include <iostream>using name...

2018-07-23 14:06:26 576

空空如也

空空如也

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

TA关注的人

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