自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 资源 (2)
  • 收藏
  • 关注

原创 蓝桥杯PREV-6 翻硬币(贪心)

历届试题 翻硬币  时间限制:1.0s   内存限制:256.0MB      问题描述小明正在玩一个“翻硬币”的游戏。桌上放着排成一排的若干硬币。我们用 * 表示正面,用 o 表示反面(是小写字母,不是零)。比如,可能情形是:**oo***oooo如果同时翻转左边的两个硬币,则变为:oooo***oooo现在小明的问题是

2017-02-28 13:37:27 239

原创 #402 (Div. 2)A. Pupils Redistribution

A. Pupils Redistributiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Berland each high school student

2017-02-26 19:03:28 262

原创 UVA 202 循环小数

看不懂,先立个Flag吧import java.util.Arrays;import java.util.Scanner;public class Main { static int[] r = new int[3003]; static int[] u = new int[3003]; static int[] s = new int[3003]; public static

2017-02-25 10:59:40 360

原创 UVA 1586 分子量(简单模拟计算)

思路,先判断当前字符是不是数字,不是数字的话先记录当前字符,然后向后查找直到下一个不是数字的字符出现。import java.util.Scanner;public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); double[] A = {12

2017-02-25 10:34:43 361

原创 蓝桥杯PREV-8 买不到的数目(简单dp)

历届试题 买不到的数目  时间限制:1.0s   内存限制:256.0MB      问题描述小明开了一家糖果店。他别出心裁:把水果糖包成4颗一包和7颗一包的两种。糖果不能拆包卖。小朋友来买糖的时候,他就用这两种包装来组合。当然有些糖果数目是无法组合出来的,比如要买 10 颗糖。你可以用计算机测试一下,在这种包装情况下,最大不能买到的数量

2017-02-23 14:36:21 393

原创 蓝桥杯PREV-3 带分数(搜索,剪枝,枚举)

历届试题 带分数  时间限制:1.0s   内存限制:256.0MB      问题描述100 可以表示为带分数的形式:100 = 3 + 69258 / 714。还可以表示为:100 = 82 + 3546 / 197。注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。类似这样的带分数,100 有 11 种表示法。

2017-02-21 10:43:31 406

原创 蓝桥杯PREV-4 剪格子 (搜索)

历届试题 剪格子  时间限制:1.0s   内存限制:256.0MB      问题描述如下图所示,3 x 3 的格子中填写了一些整数。+--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+我们沿着图中的星号线剪开,得到两个部分,

2017-02-21 09:03:37 217

原创 uva 10305 Ordering Tasks(拓扑排序)

https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1246题目:John has n tasks to do. Unfortunately, the tasks are not independent an

2017-02-19 16:23:27 373

原创 UVA 816 Abbott's Revenge

https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=757BFS,有点复杂,看着别人的代码调试了半天,争取自己写出来。import java.util.LinkedList;import java.util.Queue;import jav

2017-02-19 10:51:51 395

原创 #398 DIV2 A. Snacktower

http://codeforces.com/contest/767/problem/AA. Snacktowertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2017-02-19 08:54:23 418

原创 UVA 699 The Falling Leaves

https://vjudge.net/problem/UVA-699利用数组,把数组中间的元素作为根,下表为p,左子树p-1,右子树p+1;import java.util.Scanner;import java.util.Vector;public class Main { private static int maxn = 1000; private static

2017-02-18 14:56:31 194

原创 UVA 546 Tree (二叉树综合运用)

https://vjudge.net/problem/UVA-548You are to determine the value of the leaf node in a given binary tree that is the terminal node of apath of least value from the root of the binary tree to any

2017-02-17 23:27:12 441

原创 UVA 122 Trees on the level (二叉树层次遍历)

Background背景Trees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking Machines' CM-5 are based on fat trees. Quad- and octal-trees

2017-02-17 21:10:53 511

原创 UVA 679 Dropping Balls (二叉树的编号)

https://vjudge.net/problem/UVA-679A number ofKballs are dropped one by one from the root of a fully binary tree structure FBT. Eachtime the ball being dropped first visits a non-terminal node.

2017-02-17 20:17:06 258

原创 UVA 442 Matrix Chain Multiplication (矩阵链乘)

https://vjudge.net/problem/UVA-442Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multi

2017-02-17 09:42:01 281

原创 UVa 514 Rails(经典栈)

https://vjudge.net/problem/UVA-514There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely

2017-02-17 09:01:33 294

原创 算法训练 最小乘积(基本型)

算法训练 最小乘积(基本型)  时间限制:1.0s   内存限制:512.0MB    问题描述  给两组数,各n个。  请调整每组数的排列顺序,使得两组数据相同下标元素对应相乘,然后相加的和最小。要求程序输出这个最小值。  例如两组数分别为:1 3  -5和-2 4 1  那么对应乘积取和的最小值应为:  (-5) * 4 + 3 *

2017-02-16 20:40:55 402

原创 蓝桥杯ALGO-3 K好数

问题描述如果一个自然数N的K进制表示中任意的相邻的两位都不是相邻的数字,那么我们就说这个数是K好数。求L位K进制数中K好数的数目。例如K = 4,L = 2的时候,所有K好数为11、13、20、22、30、31、33 共7个。由于这个数目很大,请你输出它对1000000007取模后的值。输入格式输入包含两个正整数,K和L。输出格式输出一个整数

2017-02-15 23:16:18 353

转载 蓝桥杯ALGO-2 最大最小公倍数

算法训练 最大最小公倍数  时间限制:1.0s   内存限制:256.0MB      问题描述已知一个正整数N,问从1~N中任选出三个数,他们的最小公倍数最大可以为多少。输入格式输入一个正整数N。输出格式输出一个整数,表示你找到的最小公倍数。样例输入9样例输出504数据

2017-02-15 20:23:02 226

原创 #396 B. Mahmoud and a Triangle

B. Mahmoud and a Triangletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud has n line segments, the 

2017-02-15 12:41:29 270

原创 hdu 七夕节

七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!"人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下:数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因子有1,2,3,4,6.你想知道你的另一半吗? Input输入数据的第一

2017-02-14 13:52:10 305

原创 蓝桥杯ALGO-148(最小公倍数 )

问题描述  编写一函数lcm,求两个正整数的最小公倍数。样例输入一个满足题目要求的输入范例。例:3 5样例输出与上面的样例输入对应的输出。例:数据规模和约定  输入数据中每一个数的范围。  例:两个数都小于65536。import java.util.Scanner;public class Ma

2017-02-12 23:13:06 606

原创 蓝桥杯ALGO-150(递归求二项式系数值 )

问题描述样例输入一个满足题目要求的输入范例。3 10样例输出与上面的样例输入对应的输出。数据规模和约定  输入数据中每一个数的范围。  例:结果在int表示时不会溢出。import java.util.Scanner;public class Main { public static void main(

2017-02-12 23:00:53 620

原创 蓝桥杯试题集ALGO-156(表达式计算)

import java.util.Collections;import java.util.Scanner;import java.util.Stack;public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = n

2017-02-12 22:52:22 939

地铁仿真系统

C#期末大作业,地铁仿真系统。

2017-02-12

androidLrcView-master

androidLrcView,以前Github上有,现在好像没有了

2016-08-27

空空如也

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

TA关注的人

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