08 2018 档案
摘要:Starting a Scenic Railroad Service 题目描述 Jim, working for a railroad company, is responsible for planning a new tourist train service. He is sure that
阅读全文
摘要:Rendezvous on a Tetrahedron 题目描述 One day, you found two worms P and Q crawling on the surface of a regular tetrahedron with four vertices A, B, C, and
阅读全文
摘要:Knightsbridge Rises 题目描述 High-rise buildings in the wealthy retail district of Knightsbridge are usually built with exotic hoisting machines known, in
阅读全文
摘要:7033: Lounge Lizards 题目描述 Monitor lizards are a kind of reptile known mainly for their cold-bloodedness and addiction to computer screens. Due to thei
阅读全文
摘要:火车进出栈问题 题目描述 一列火车n节车厢,依次编号为1,2,3,…,n。每节车厢有两种运动方式,进栈与出栈,问n节车厢出栈的可能排列方式有多少种。 输入 一个数,n(n<=60000) 输出 一个数s表示n节车厢出栈的可能排列方式 样例输入 样例输出 思路: 易得答案为 第n项卡特兰数, 可以通过
阅读全文
摘要:Editor 题目描述 You are going to implement the most powerful editor for integer sequences.The sequence is empty when the editor is initialized.There are 5
阅读全文
摘要:Problem E. TeaTree Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1248 Accepted Submission(s):
阅读全文
摘要:问题 C: Crowd Control 题目描述 The BAPC draws a large number of visitors to Amsterdam. Many of these people arrive at the train station, then walk from inte
阅读全文
摘要:4894: Booming Business 题目描述 You are an expert in bonsai, the Japanese art of cultivating small trees in small containers.Every year, you win the Bonsa
阅读全文
摘要:8377: Playoff 题目描述 The Minato Mirai Football Association hosts its annual championship as a single round-robin tournament, in which each team plays a
阅读全文
摘要:Problem J. CSGO Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 444 Accepted Submission(s): 220
阅读全文
摘要:Problem L.Videos Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 163 Accepted Submission(s): 63
阅读全文
摘要:问题 F: Making the Grade 题目描述 A straight dirt road connects two fields on FJ's farm, but it changes elevation more than FJ would like. His cows do not m
阅读全文
摘要:Description Mr. Young wishes to take a picture of his class. The students will stand in rows with each row no longer than the row behind it and the le
阅读全文
摘要:C. The Phone Number time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. The Phone Number t
阅读全文
摘要:问题 M: 区间和 题目描述 给定一数列,规定有两种操作,一是修改某个元素,二是求区间的连续和。 输入 输入数据第一行包含两个正整数n,m(n<=100000,m<=500000),以下是m行,每行有三个正整数k,a,b(k=0或1, a,b<=n).k=0时表示将a处数字加上b,k=1时表示询问区
阅读全文
摘要:问题 A: 棋盘V 题目描述 有一块棋盘,棋盘的边长为100000,行和列的编号为1到100000。棋盘上有n个特殊格子,任意两个格子的位置都不相同。现在小K要猜哪些格子是特殊格子。她知道所有格子的横坐标和纵坐标,但并不知道对应关系。换言之,她只有两个数组,一个存下了所有格子的横坐标,另一个存下了所
阅读全文
摘要:KMP是一种复杂度为O(n+m)的字符串匹配算法,最难理解的部分就是Next数组的求解 Next数组即为模板串的每个位置对应的 0~i 位置的前缀与后缀中的最大公共部分,依此公共部分来实现模板串的移动匹配,依此大幅度降低了字符串匹配的复杂度。 Next数组的其实就是对模板串相同前缀后缀的一个递归匹配
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/143/A 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 题目描述 Kan
阅读全文