- 博客(256)
- 资源 (4)
- 收藏
- 关注
原创 前端笔记
代表一级标题,也表示此篇笔记的名字二级标题第一个知识点第一个知识点的小点 第一 第二一列 两列 应用,一般是对本篇笔记知识点的引入,类似于引言 代码格式化:jQuery(function(){ //initialize swiper when document ready var mySwiper = new Swiper('#swiper',{ // Option
2017-11-10 20:00:20 383
原创 cookie中文乱码问题解决
cookie中文乱码问题解决 cookie默认ASCII编码,不支持中文。 1. 错误演示Cookie c = new Cookie("username", "张三"); response.addCookie(c);如果上述写法,会报异常 java.lang.IllegalArgumentException: Control character in cookie value or attri
2017-07-22 15:42:35 1957
原创 黑马程序员--Java 7K面试题之交通灯管理系统
面试题目: 模拟实现十字路口的交通灯管理系统逻辑,具体需求如下: 异步随机生成按照各个路线行驶的车辆。 例如: 由南向而来去往北向的车辆 ---- 直行车辆 由西向而来去往南向的车辆 ---- 右转车辆 由东向而来去往南向的车辆 ---- 左转车辆 。。。 信号灯忽略黄灯,只考虑红灯和绿灯。 应考虑左转车辆控制信号灯,右转车辆不受信号灯控制。 具体信号灯控制
2014-09-17 23:45:22 1117
原创 黑马程序员--Java 7K面试题之银行调度系统
1.银行调度系统: 银行业务调度系统 模拟实现银行业务调度系统逻辑,具体需求如下: Ø 银行内有6个业务窗口,1 - 4号窗口为普通窗口,5号窗口为快速窗口,6号窗口为VIP窗口。 Ø 有三种对应类型的客户:VIP客户,普通客户,快速客户(办理如交水电费、电话费之类业务的客户)。 Ø 异步随机生成各种类型的客户,生成各类型用户的概率比例为:
2014-09-17 17:24:55 792
原创 黑马程序员--java集合的底层数据结构
1.ArrayList public class ArrayList extends AbstractList implements List, RandomAccess, Cloneable, java.io.Serializable { ...... /** * The array buffer into which the elements of
2014-09-17 10:24:41 2315
转载 快速求幂
原文地址:快速求幂作者:wangkun199209快速求正整数次幂,当然不能直接死乘。举个例子: 3 ^ 999 = 3 * 3 * 3 * … * 3 直接乘要做998次乘法。但事实上可以这样做,先求出2^k次幂: 3 ^ 2 = 3 * 3 3 ^ 4 = (3 ^ 2) * (3 ^ 2) 3 ^ 8 = (3 ^ 4) * (3 ^ 4) 3 ^ 16 = (3 ^ 8) *
2014-09-16 19:17:58 511
原创 Connect city
city" TITLE="Connect city" />Problem D:Connect city Time Limit:3000MS Memory Limit:65536K Total Submit:19 Accepted:9 Page View:241 [Submit] [Status] [Clarify] Font Size: Aa Aa Aa Description A
2014-09-16 19:17:56 453
原创 奇怪的电梯
Problem C:奇怪的电梯 Time Limit:1000MS Memory Limit:65536K Total Submit:61 Accepted:16 Page View:307 [Submit] [Status] [Clarify] Font Size: Aa Aa Aa Description 有一个奇怪的电梯,它可以停在任何一层楼,并且在每一层楼上有一个数字Xi 。
2014-09-16 19:17:54 792
原创 Jump
Problem B:Jump Time Limit:1000MS Memory Limit:65536K Total Submit:43 Accepted:12 Page View:297 [Submit] [Status] [Clarify] Font Size: Aa Aa Aa Description There is n pillars, their heights are
2014-09-16 19:17:52 594
原创 A strange lift
Problem 89 » A strange lift 查看标程 Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two
2014-09-16 19:17:50 478
原创 Asteroids!
Problem 86 » Asteroids! 查看标程 Description You're in space. You want to get home. There are asteroids. You don't want to hit them. INPUT Input to this problem will consist of a (non-empty) series o
2014-09-16 19:17:48 1080
原创 Calculate the Sum
Calculate the Sum Time Limit: 1000MS Memory Limit: 10000KB Submissions: 72 Accepted: 17 Description As you all know, MOD is a mathematical operatio. Giving you
2014-09-16 19:17:46 1272
原创 dearway's problem
dearway's problem Description 请编写一个程序,输出N的阶乘的十进制表示中从最末一个非0位开始自低位向高位数的第K位。其中:0<=N<=10000,1<=K<=5 例如:N=4,K=2,结果是2(4!=24) N=6,K=1,结果为2(6!=720) Input 有多组输入数据。每组数据输入两个整数N,K Output 输出每行一个整数,即测试数据的结果。 Sa
2014-09-16 19:17:44 802
原创 Partition-based general selectio…
Description A worst-case linear algorithm for the general case of selecting the kth largest element was published by Blum, Floyd, Pratt, Rivest, and Tarjan in their 1973 paper Time bounds for selectio
2014-09-16 19:17:41 503
原创 寻找给定区间内的第k小(大)的元…
第一节、寻找给定区间内的第k小(大)的元素 给定数组,给定区间,求第K小的数如何处理?常规方法请查阅:程序员编程艺术:第三章、寻找最小的k个数。 1、排序,快速排序。我们知道,快速排序平均所费时间为n*logn,从小到大排序这n个数,然后再遍历序列中后k个元素输出,即可,总的时间复杂度为O(n*logn+k)=O(n*logn)。 2、排序,选择排序。用选择或交换排序,即遍历n个数,先把最先遍
2014-09-16 19:17:39 577
原创 problem B
Problem 54 » problem B 查看标程 Description 输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。 你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。 INPUT 输入包含多组测
2014-09-16 19:17:37 383
原创 Problem B
Problem 13 » Problem B 查看标程 Description Given a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k same characters should be encoded t
2014-09-16 19:17:35 465
原创 Problem A
Problem 53 » Problem A 查看标程 Description "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There will be
2014-09-16 19:17:33 482
原创 Accepted Necklace
Problem 82 » Accepted Necklace 查看标程 Description I have N precious stones, and plan to use K of them to make a necklace for my mother, but she won't accept a necklace which is too heavy. Given the
2014-09-16 19:17:31 414
原创 Accepted Necklace
Problem 82 » Accepted Necklace 查看标程 Description I have N precious stones, and plan to use K of them to make a necklace for my mother, but she won't accept a necklace which is too heavy. Given the
2014-09-16 19:17:29 545
原创 Sum It Up
Problem 80 » Sum It Up 查看标程 Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the l
2014-09-16 19:17:27 423
原创 Oil Deposits
Problem 11 » Oil Deposits 查看标程 Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land
2014-09-16 19:17:25 371
原创 Robot Motion
Problem 78 » Robot Motion 查看标程 Description Motion" TITLE="Robot Motion" /> A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to
2014-09-16 19:17:22 607
原创 Problem 81 » Red and Black
Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles
2014-09-16 19:17:20 535
原创 A + B Problem II
A + B Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 100564 Acce
2014-09-16 19:17:18 443
原创 Box of Bricks
Box of Bricks Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2481 Accepted Submission(s): 567 Problem Description Little Bob likes pla
2014-09-16 19:17:16 419
原创 GPA
GPA Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1118 Accepted Submission(s): 466 Problem Description Each course grade is one of th
2014-09-16 19:17:14 554
原创 decimal system
decimal system Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1191 Accepted Submission(s): 482 Problem Description As we know , we alw
2014-09-16 19:17:12 449
原创 Quicksum
Quicksum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 776 Accepted Submission(s): 533 Problem Description A checksum is an algorithm
2014-09-16 19:17:10 380
原创 The Seven Percent Solution
The Seven Percent Solution Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 778 Accepted Submission(s): 499 Problem Description Uniform
2014-09-16 19:17:08 479
原创 find your present (2)
find your present (2) Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/1024 K (Java/Others) Total Submission(s): 1835 Accepted Submission(s): 543 Problem Description In the new ye
2014-09-16 19:17:06 494
原创 Nasty Hacks
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 872 Accepted Submission(s): 589 Problem Description You are the CEO of Nast
2014-09-16 19:17:04 503
原创 A+B for Input-Output Practice (V…
A+B for Input-Output Practice (VIII) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9288 Accepted Submission(s):
2014-09-16 19:17:01 481
原创 最大子矩阵!
问题描述:(具体见http://acm.hdu.edu.cn/showproblem.php?pid=1081) 给定一个n*n(0 Example: 0 -2 -7 0 9 2 -6 2 -4 1 -4 1 -1 8 0 -2 其中左上角的子矩阵: 9 2 -4 1 -1 8 此子矩阵的值为9+2+(-4)+1+(-1)+8=15。 我们首先想到的方法就是穷举一个矩阵的所有子矩阵,然而一个n
2014-09-16 19:16:59 397
原创 PostOffice
PostOffice Time Limit: 1000MS Memory Limit: 65535KB Submissions: 200 Accepted: 54 Description 在一个按照东西和南北方向划分成规整街区的城市里,n个居民点散乱地分布在不同的街区中。用x 坐标表示东西向,用y坐标表示南北向。各居
2014-09-16 19:16:57 918
原创 2012年02月06日
轰炸 Time Limit: 1000MS Memory Limit: 65535KB Submissions: 54 Accepted: 10 Description “我该怎么办?”飞行员klux向你求助。 事实上,klux面对的是一个很简单的问题,但是他实在太菜了。 klux要想轰炸某个区域内的一些地方,它们是位于平面上的一些点,但是(显然地)klux遇到了抵抗,所以k
2014-09-16 19:16:55 519
原创 线性表的顺序存储
线性表的顺序存储 Time Limit: 1000MS Memory Limit: 65535KB Submissions: 1667 Accepted: 443 Description 建立长度为n的顺序表SeqList,长度n通过和n个数据元素通过键盘输入。 要求: 1)通过调用插入函数,建立一个长度为n的顺序表
2014-09-16 19:16:53 384
duilib 计算器源码
2014-05-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人