摘要: Sample Input Sample Output4 8 50 2 10 40 2 2 80 9 13 20 5110Sample Input Sample Output10 2079 809484 180 8347 336421 2509 3732 560423 483 2619 958859 阅读全文
posted @ 2020-04-21 17:05 AlexLIN· 阅读(174) 评论(0) 推荐(0)
摘要: Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 2920 Accepted: 1483 Description Recently Georgie has learned about polynomials. A polynomia 阅读全文
posted @ 2020-04-21 16:46 AlexLIN· 阅读(289) 评论(0) 推荐(0)
摘要: Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 49924 Accepted: 12705 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the ann 阅读全文
posted @ 2020-04-21 16:30 AlexLIN· 阅读(179) 评论(0) 推荐(0)
摘要: 1798: [Ahoi2009]Seq 维护序列seq Time Limit: 30 Sec Memory Limit: 64 MBSubmit: 9612 Solved: 3560[Submit][Status][Discuss] Description 老师交给小可可一个维护数列的任务,现在小可 阅读全文
posted @ 2020-04-21 16:21 AlexLIN· 阅读(156) 评论(0) 推荐(0)
摘要: Examples input Copy 31 21 3 output Copy 0 input Copy 51 22 33 44 5 output Copy 2 Note Tree definition: https://en.wikipedia.org/wiki/Tree_(graph_theor 阅读全文
posted @ 2020-04-18 23:35 AlexLIN· 阅读(202) 评论(0) 推荐(0)
摘要: You are given n magical numbers a 1, a 2, ..., a n, such that the length of each of these numbers is 20 digits. You can move from the i th number to t 阅读全文
posted @ 2020-04-18 16:34 AlexLIN· 阅读(165) 评论(0) 推荐(0)
摘要: You are given an array a consisting of n integers. A subarray (l, r) from array a is defined as non-empty sequence of consecutive elements al, al + 1, 阅读全文
posted @ 2020-04-17 00:55 AlexLIN· 阅读(256) 评论(0) 推荐(0)
摘要: An anagram is a word or phrase formed by rearranging the letters of another word or phrase, using all the original letters exactly once, such as "post 阅读全文
posted @ 2020-04-16 16:56 AlexLIN· 阅读(240) 评论(0) 推荐(0)
摘要: 题意: 一开始所有点都是花园 1为首都(即根) 现在n个点里弄k个工厂,而密探都在工厂点上 密探回首都时每经过一个花园时幸福度+1 密探一定走最短路 问最大幸福度之和 思路:BFS求出每个节点的深度,然后再减掉每个节点儿子所做的贡献,思路在代码中(DFS更简单) 代码: #include <iost 阅读全文
posted @ 2020-04-16 11:59 AlexLIN· 阅读(211) 评论(0) 推荐(0)
摘要: Output For each test case, print a single line containing the number of unique subarrays OR values among the subarray OR values of all subarrays in th 阅读全文
posted @ 2020-04-15 18:23 AlexLIN· 阅读(188) 评论(0) 推荐(0)