07 2019 档案
摘要:A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 163977 Accepted: 50540 Case Time Limit: 2000MS Description
阅读全文
摘要:Buy Tickets Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 26443 Accepted: 12639 Description Railway tickets were difficult to buy around
阅读全文
摘要:线段树它是一棵高度平衡的二叉树,很多二叉树的性质它是完美继承的 我们来看一道题: HDU1166敌兵布阵 这道题如果用常规暴力的做法,就把所有营地的士兵存在一个数组里面,然后对于每次操作直接更新对应位置的数,对于每次询问直接从i到j加起来。然而这么操作下来,对于极限数据50000个人,40000条命
阅读全文
摘要:E.Easy Climb Somewhere in the neighborhood we have a very nice mountain that gives a splendid view over the surrounding area. There is one problem tho
阅读全文
摘要:我们从最简单的问题开始: 给定一个长度为N的整数数列a(i),i=0,1,...,N-1和窗长度k. 要求: f(i) = max{a(i-k+1),a(i-k+2),..., a(i)},i = 0,1,...,N-1 问题的另一种描述就是用一个长度为k的窗在整数数列上移动,求窗里面所包含的数的最
阅读全文
摘要:Feel Good Time Limit: 3000MS Memory Limit: 65536KTotal Submissions: 11626 Accepted: 3212Case Time Limit: 1000MS Special JudgeDescriptionBill is develo
阅读全文
摘要:链接:https://vjudge.net/problem/UVA-1363 题意:给出n k,当 i 属于 1~n 时 ,求解 n% i 的和 n 和 k 的范围都是 1 到 10^9; 商相同 的余数数列 是 公差为商 的 递减等差数列 应该让k / i相等的一连串k % i相加,举个例子: 1
阅读全文
摘要:Ignatius and the Princess IV Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K (Java/Others)Total Submission(s): 50812 Accepted Submi
阅读全文
摘要:Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12948 Accepted Submi
阅读全文
摘要:Problem C Updating a Dictionary In this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-
阅读全文
摘要:{A} + {B} Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33500 Accepted Submission(s): 13448 Pr
阅读全文
摘要:The kth great number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 16226 Accepted Submission(s)
阅读全文
摘要:Word Amalgamation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9968 Accepted: 4774 Description In millions of newspapers across the Unit
阅读全文
摘要:B. Misha and Changing Handles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Misha hacke
阅读全文
摘要:Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 165255 Accepted Submission(s
阅读全文
摘要:Avin meets a rich customer today. He will earn 1 million dollars if he can solve a hard problem. There are n warehouses and m workers. Any worker in t
阅读全文
摘要:vin is observing the cars at a crossroads. He finds that there are n cars running in the east-west direction with the i-th car passing the intersectio
阅读全文
摘要:B. Email from Polycarp time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Methodius receive
阅读全文
摘要:G. Repeat it time limit per test 2.0 s memory limit per test 64 MB input standard input output standard output G. Repeat it time limit per test 2.0 s
阅读全文
摘要:F. Fairness time limit per test 2.0 s memory limit per test 64 MB input standard input output standard output Dwik and his brother Samir both received
阅读全文
摘要:E. Playing with numbers time limit per test 2.0 s memory limit per test 64 MB input standard input output standard output E. Playing with numbers time
阅读全文
摘要:B. RGB plants time limit per test 2.0 s memory limit per test 64 MB input standard input output standard output B. RGB plants time limit per test 2.0
阅读全文
摘要:J. Cola time limit per test 4.0 s memory limit per test 64 MB input standard input output standard output J. Cola time limit per test 4.0 s memory lim
阅读全文
摘要:Cleaning Shifts Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 40751 Accepted: 9871 Description Farmer John is assigning some of his N (1
阅读全文
摘要:Tian Ji -- The Horse Racing Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 17699 Accepted: 5461 Description Here is a famous story in Chin
阅读全文
摘要:Evil Straw Warts Live Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1799 Accepted: 523 Description A palindrome is a string of symbols th
阅读全文
摘要:Task Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13880 Accepted Submission(s): 3420 Problem D
阅读全文
摘要:B. Sport Mafia time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Each evening after the di
阅读全文
摘要:C. Basketball Exercise time limit per test 2 seconds time limit per test memory limit per test 256 megabytes memory limit per test input standard inpu
阅读全文
摘要:Y2K Accounting Bug Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18534 Accepted: 9346 Description Accounting for Computer Machinists (ACM
阅读全文
摘要:Radar Installation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 123150 Accepted: 27237 Description Assume the coasting is an infinite st
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/993/C来源:牛客网 题目描述 Farmer John recently bought another bookshelf for the cow library, but the shelf is getting fi
阅读全文
摘要:题目链接:https://ac.nowcoder.com/acm/contest/993/ABessie is playing a card game with her N-1 (2 <= N <= 100) cow friends using a deck with K (N <= K <= 10
阅读全文
摘要:Aggressive cows Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25944 Accepted: 11982 Description Farmer John has built a new long barn, wi
阅读全文
摘要:E. MaratonIME does (not do) PAs time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output Another semester ha
阅读全文
摘要:B. Yet Another Crosses Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Yet An
阅读全文
摘要:Dating with girls(1) Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5709 Accepted Submission(s):
阅读全文
摘要:Protecting the Flowers Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 11402 Accepted: 4631 Description Farmer John went to cut some wood a
阅读全文
摘要:Doing Homework again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20510 Accepted Submission(s)
阅读全文
摘要:一、基本概念 所谓贪心算法是指,在对问题求解时,总是做出在当前看来是最好的选择。也就是说,不从整体最优上加以考虑,他所做出的仅是在某种意义上的局部最优解。 贪心算法没有固定的算法框架,算法设计的关键是贪心策略的选择。必须注意的是,贪心算法不是对所有问题都能得到整体最优解,选择的贪心策略必须具备无后效
阅读全文
摘要:E. Third-Party Software - 2 time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output E. Third-Party Software
阅读全文
摘要:Trie树(来自单词retrieval),又称前缀字,单词查找树,字典树,是一种树形结构,是一种哈希树的变种,是一种用于快速检索的多叉树结构。 字典树是处理字符串常见的一种树形数据结构,其优点是利用字符串的公共前缀来节约存储空间 字典树完整结构 实际上每个节点的子节点都应该从0编到——25,但这样会
阅读全文
摘要:全文检索 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2553 Accepted Submission(s): 853 Problem Des
阅读全文
摘要:Phone List Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27948 Accepted Submission(s): 9204 Pro
阅读全文
摘要:What Are You Talking About Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 31176 Accepted Subm
阅读全文
摘要:当需要的信息要经过两个链接才能打开的时候,就需要用到嵌套爬取。 比如要爬取起点中文网排行榜的小说简介,找到榜单网址:https://www.qidian.com/all?orderId=&style=1&pageSize=20&siteid=1&pubflag=0&hiddenField=0&pag
阅读全文
摘要:从网页爬取文本信息: eg:从http://computer.swu.edu.cn/s/computer/kxyj2xsky/中爬取讲座信息(讲座时间和讲座名称) 注:如果要爬取的内容是多页的话,网址一定要从第二页开始,因为有的首页和其他页的网址有些区别 代码 import pymysql impo
阅读全文
摘要:首先要连接自己的数据库 import pymysql import requests #需要导入模块 db = pymysql.connect('localhost', 'root', '*********', 'mysql')#第三个是数据库密码,第四个是数据库名称 print("数据库连接成功!
阅读全文
摘要:Immediate Decodability Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5334 Accepted Submission(s
阅读全文
摘要:Hat’s Words Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20441 Accepted Submission(s): 7162 Pr
阅读全文
摘要:统计难题 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 65094 Accepted Submission(s): 22446 Problem
阅读全文