首页 > TAG信息列表 > 1159

1159:斐波那契数列

【题目描述】 用递归函数输出斐波那契数列第n项。0,1,1,2,3,5,8,13…… 【输入】 一个正整数n,表示第n项。 【输出】 第n项是多少。 【输入样例】 3 【输出样例】 1 #include<iostream> #include<cstdio> using namespace std; int d(int x) //函数:计算斐波那契数列,参数:第x项 { i

ZZULIOJ:1159最大的两个数:指针专题

1159: 最大的两个数(指针专题) 时间限制: 1 Sec 内存限制: 128 MB 提交: 10736 解决: 5853 [状态] [讨论版] [提交] [命题人:admin] 题目描述 求n个整数中的最大的两个元素。要求定义一个函数LargestTow(),求数组a的最大的两个元素,分别存入形参指针pfirst和psecond所指存储单元,

html+css实现站酷网 页面(源代码百度网盘自取)

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title>

1159 Problem H 《C语言程序设计》江宝钏主编-习题3-7-交换变量

题目描述 编写程序,从键盘输入两个浮点数给变量xy输出xy 在交换x和y中的值后,再输出x和y,验证两个变量中的值是否正确的进行了交换。 输入数据可能有整数,请用%g输出。 输入 两个浮点数 输出 第一行两个浮点数原来的顺序 第二行两个浮点数交换后的顺序 样例输入 Copy 1.1 2.1 样

【洛谷 1159】排行榜

  题目描述 小迈克尔住在一个小镇上,他喜欢看每周日下午发布的音乐电视评比。它每周都根据选票介绍相同的歌曲,列出这些歌曲的流行排行榜。 有一个星期日迈克尔和他的朋友在一起玩得太久了以致于未能看到新的流行榜。他非常失望,但是不久他就发现下周至少可以部分地建立出流行榜。

Palindrome POJ-1159

A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the minimal number of characters to be inserted into the string in or

HDU 1159 Common Subsequence (最长公共子序列)

  文章作者:ktyanny 文章来源:ktyanny 转载请注明,谢谢合作。        ktyanny本打算复习考试周研究一下动态规划,今天早上起得很晚,爬起来就想起这件事了,找到一个最水的最长公共子序列的题目,其实算是裸题了。  题目的意思就是给出两个串x和y,让你输出出他们的最长公共子

Codeforces 1159

1159 B 题意 给你一个序列 \(a(a_i\le 10^9)\) ,长度 \(n\le 10^5\) ,求 \(\text{floor}(\min(\frac{\min(a_i,a_j)}{|i-j|}))\) Examples input 4 6 4 5 5 output 1 input 3 0 1 2 output 0 input 4 821 500 479 717 output 239 解 对于每个固定的 \(a_i\) ,我们要么把它和 \(a_1\)

CentOS最小系统VM桥接设置

参考下面链接: https://blog.ttionya.com/article-1159.html https://blog.csdn.net/jmyue/article/details/17288467