- 博客(23)
- 收藏
- 关注
原创 Logic Expression Tree
题目1 : Logic Expression Treehiho一下 第217周时间限制:10000ms单点时限:1000ms内存限制:256MB描述You are given a logic expression tree of N nodes which are numbers from 1 to N. The leaf nodes are boolean values(...
2018-12-31 14:34:27 200
原创 Gas Stations
题目1 : Gas Stations时间限制:10000ms单点时限:1000ms内存限制:256MB描述There are N gas stations on a straight, M kilo-meters long highway. The i-th gas station is Ai kilo-meters away from the beginning of the...
2018-12-31 14:33:45 171
原创 Keywords Filter
218 周题目1 : Keywords Filter时间限制:10000ms单点时限:1000ms内存限制:256MB描述You are given a string S which consists of only lower case letters and N keyword W1, W2, ... WN which also consists of only low...
2018-12-31 13:20:25 404
原创 Smallest Rectangle
题目1 : Smallest Rectangle时间限制:10000ms单点时限:1000ms内存限制:256MB描述You are given N 2D points P1, P2, ... PN. If there is a rectangle satisfying that its 4 vertices are in the given point set and its...
2018-12-31 12:18:23 289
原创 闰秒
题目1 : 闰秒时间限制:10000ms单点时限:1000ms内存限制:256MB描述计算机系统中使用的UTC时间基于原子钟,这种计时方式同“地球自转一周是24小时”的计时方式有微小的偏差。为了弥补这种偏差,我们偶尔需要增加一个“闰秒”。 最近的一次闰秒增加发生在UTC时间2016年的最后一天。我们在2016年12月31日23时59分59秒和2017年1月1日0时0分0秒...
2018-12-31 10:45:05 4751
原创 Push Button I
题目1 : Push Button I时间限制:5000ms单点时限:1000ms内存限制:256MB描述There are N buttons on the console. Each button needs to be pushed exactly once. Each time you may push several buttons simultaneously....
2018-12-29 15:22:04 380
原创 Push Button II
题目1 : Push Button II时间限制:10000ms单点时限:1000ms内存限制:256MB描述There are N buttons on the console. Each button needs to be pushed exactly once. Each time you may push several buttons simultaneously....
2018-12-29 14:48:27 161
原创 Big Plus
题目1 : Big Plus时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given an NxN 01 matrix, find the biggest plus (+) consisting of 1s in the matrix.size 1 plus size 2 plus size 3 plus size 4 plus ...
2018-12-29 13:45:14 234
原创 Interval Coverage
Interval Coverage描述You are given N intervals [S1, T1], [S2, T2], [S3, T3], ... [SN, TN] and a range [X, Y]. Select minimum number of intervals to cover range [X, Y].输入The first line contains 3...
2018-12-28 23:19:41 218
原创 Split Array
题目1 : Split Array时间限制:10000ms单点时限:1000ms内存限制:256MB描述You are given an sorted integer array A and an integer K. Can you split A into several sub-arrays that each sub-array has exactly K con...
2018-12-28 22:29:42 692
原创 Inside Triangle
题目1 : Inside Triangle时间限制:10000ms单点时限:1000ms内存限制:256MB描述Determine if a point is inside a 2D triangle.输入The first line contains an integer T denoting the number of test case. (1 <= T &...
2018-12-28 20:26:27 155
原创 Ctrl-C Ctrl-V
题目1 : Ctrl-C Ctrl-V时间限制:10000ms单点时限:1000ms内存限制:256MB描述Yor are bored. So you open a notepad and keep pressing letter 'A' to type a lot of 'A's into the text area.Suddenly an idea come out. ...
2018-12-28 20:22:48 896
原创 Longest Subsequence
题目1 : Longest Subsequence时间限制:10000ms单点时限:1000ms内存限制:256MB描述You are given a set of N words W1, W2, ... WN and a target string S. Find the longest word which is also a subsequence of S.输入...
2018-12-27 16:16:43 303
原创 Parentheses Matching
题目1 : Parentheses Matching时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given a string of balanced parentheses output all the matching pairs.输入A string consisting of only parentheses '(' and ')'. T...
2018-12-27 11:16:09 437 1
原创 矩形计数
题目1 : 矩形计数时间限制:10000ms单点时限:1000ms内存限制:256MB描述如图所示,在由N行M列个单位正方形组成的矩形中,有K个单位正方形是黑色的,其余单位正方形是白色的。 你能统计出一共有多少个不同的子矩形是完全由白色单位正方形组成的吗?输入第一行三个整数:N, M和K。之后K行每行包括两个整数R和C,代表一个黑色单位正方形的位置。1...
2018-12-27 10:58:48 506
原创 数组分拆
时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho得到了一个数组作为他的新年礼物,他非常喜欢这个数组!在仔细研究了几天之后,小Ho成功的将这个数组拆成了若干段,并且每段的和都不为0!现在小Ho希望知道,这样的拆分方法一共有多少种?两种拆分方法被视作不同,当且仅当数组断开的所有位置组成的集合不同。输入每组输入的第一行为一...
2018-12-25 14:19:20 287
原创 Smallest Substring
时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given a string S and an integer K, your task is to find the lexicographically smallest string T which satisfies: 1. T is a subsequence of S2. The len...
2018-12-21 11:20:52 200
原创 小Ho的强迫症
描述小Ho在一条笔直的街道上散步。街道上铺着长度为L的石板,所以每隔L距离就有一条石板连接的缝隙,如下图所示。小Ho在散步的时候有奇怪的强迫症,他不希望脚踩在石板的缝隙上。(如果小Ho一只脚的脚尖和脚跟分别处于一条缝隙的两侧,我们就认为他踩在了缝隙上。如果只有脚尖或脚跟接触缝隙,不算做踩在缝隙上) 现在我们已知小Ho两只脚的长度F以及每一步步伐的长度D。如果小Ho可以任意选择起始...
2018-12-20 20:52:29 219
转载 JAVA中HashMap遍历以及排序代码
HashMap遍历import java.util.HashMap;import java.util.Map;import java.util.Scanner;public class Main { public static void main(String[] args) { HashMap<String,String> map=new...
2018-12-20 20:33:19 580
转载 Java中ArrayList的排序两种方法以及遍历的代码
方法一:在类的定义中实现Comparable接口中的compareTo()方法,然后调用Collections.sort()进行排序:import java.util.Scanner; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; class Student ...
2018-12-20 20:31:34 273
原创 hiho232周 拆字游戏
时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Kui喜欢把别人的名字拆开来,比如“螺”就可以拆成“虫田糸”,小Kui的语文学的不是很好,于是她决定使用编程的方式来解决这个问题。给出一个01矩阵,1占据的部分即为需要拆的字,如果两个1分享一条边,那么它们连通。连通具有传递性,即如果a、b连通,b、c连通,则a、c连通。连通的一系列1被看做可以拆出的一...
2018-12-20 17:15:24 256
原创 eclipse左边的项目栏不见了的处理方法
window -----> Show View -----> other -----> package Explorer
2018-12-06 13:27:57 1844
原创 货运费用
题目1 : 货运费用时间限制:10000ms单点时限:1000ms内存限制:256MB描述H国有N座城市,编号1~N。城市间有M条双向的高速公路相连。每条公路都有一个车辆的最大总重限制,总重超过限制的车辆不能在该条公路上行驶。 现在小Hi希望将一批物资从1号城市运送到N号城市,货车总重是W。每经过一条公路需要缴纳1元的过路费,请你计算小Hi最少需要缴纳多少费用。输入...
2018-12-05 22:30:50 487
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人