摘要:
Day 0 上午,大概做了一套(大)信(水)心题。 让我想想我题目都是些什么鬼。。 T1:大水题。什么sort一下就过了。据说lemon上用map不会被卡常(lemon上评测,程序跑得蜜汁快)。 T2:多项式加减乘 + 表达式的计算。很多没ak的人成功栽在这道题上。 T3:还是一道水题。正反建图分别 阅读全文
摘要:
题目大意 有k个长度为k的数组,从每个数组中选出1个数,再把这k个数进行求和,问在所有的这些和中,最小的前k个和。 考虑将前i个数组合并,保留前k个和。然后考虑将第(i + 1)个数组和它合并,保留前k个和。 如果暴力的话就进行就暴力枚举每一对,然后进行求和,然后再选出前k个,然而这样会TLE。 可 阅读全文
摘要:
Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a ne 阅读全文
摘要:
You are given a connected weighted graph with n vertices and m edges. The graph doesn't contain loops nor multiple edges. Consider some edge with id i 阅读全文
摘要:
Treeland is a country in which there are n towns connected by n - 1 two-way road such that it's possible to get from any town to any other town. In Tr 阅读全文
摘要:
题目描述 本题中,我们将用符号\lfloor c \rfloor⌊c⌋表示对c向下取整,例如:\lfloor 3.0 \rfloor= \lfloor 3.1 \rfloor=\lfloor 3.9 \rfloor=3⌊3.0⌋=⌊3.1⌋=⌊3.9⌋=3。 蛐蛐国最近蚯蚓成灾了!隔壁跳蚤国的跳蚤也 阅读全文
摘要:
题目描述 对于刚上大学的牛牛来说,他面临的第一个问题是如何根据实际情况申请合适的课程。 在可以选择的课程中,有 2n2n 节课程安排在 nn 个时间段上。在第 ii(1 \leq i \leq n1≤i≤n)个时间段上,两节内容相同的课程同时在不同的地点进行,其中,牛牛预先被安排在教室 c_ici 阅读全文
摘要:
题目传送门 传送点I 传送点II 题目大意 (此题目不需要大意,我认为它已经很简洁了) 题目传送门 传送点I 传送点II 题目大意 (此题目不需要大意,我认为它已经很简洁了) 显然线段树合并(我也不知道哪来这么多显然) 考虑将每条路径拆成两条路径 s -> lca 和 t -> lca 。 对于前一 阅读全文
摘要:
题目大意 给定A串,选择A串的前lB个字符作为B串,再在B串后增加一个字符,问最长的相等的A串前缀和B串的后缀。 Solution 1(KMP) 用1个奇怪的字符连接A串和B串,再用KMP求最长公共前后缀。 Solution 2(Hash) hash A串的前缀和B的后缀,然后for去比较,取最大的 阅读全文
摘要:
Description 在光之大陆的土地上,各种势力盘根错节。来自光之峡谷的精灵,来自黑暗森林的亡灵,来自古老东方的人类共同生活在一起。善于打造装置的矮人,善于发明的侏儒,隐匿于山林的巨人也坚守着属于自己的领土。这些种族之间关系错综复杂,构成了极其庞大的关系网络。大魔法师小P想要研究其中的种族关系。 阅读全文
摘要:
This is an interactive problem. You are given a sorted in increasing order singly linked list. You should find the minimum integer in the list which i 阅读全文
摘要:
Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around the abandoned Eikou Cram School building, Oshino's 阅读全文
摘要:
— This is not playing but duty as allies of justice, Nii-chan! — Not allies but justice itself, Onii-chan! With hands joined, go everywhere at a speed 阅读全文
摘要:
Even if the world is full of counterfeits, I still regard it as wonderful. Pile up herbs and incense, and arise again from the flames and ashes of its 阅读全文
摘要:
Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new g 阅读全文
摘要:
You are given n strings s1, s2, ..., sn consisting of characters 0 and 1. m operations are performed, on each of them you concatenate two existing str 阅读全文
摘要:
Snark and Philip are preparing the problemset for the upcoming pre-qualification round for semi-quarter-finals. They have a bank of nproblems, and the 阅读全文
摘要:
Have you ever tried to explain to the coordinator, why it is eight hours to the contest and not a single problem has been prepared yet? Misha had. And 阅读全文
摘要:
As technologies develop, manufacturers are making the process of unlocking a phone as user-friendly as possible. To unlock its new phone, Arkady's pet 阅读全文
摘要:
(Another) YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulti 阅读全文
摘要:
In this problem you will meet the simplified model of game Pudding Monsters. An important process in developing any game is creating levels. A game fi 阅读全文
摘要:
Little boy Igor wants to become a traveller. At first, he decided to visit all the cities of his motherland — Uzhlyandia. It is widely known that Uzhl 阅读全文
摘要:
Grigory loves strings. Recently he found a metal strip on a loft. The strip had length n and consisted of letters "V" and "K". Unfortunately, rust has 阅读全文
摘要:
Leha plays a computer game, where is on each level is given a connected graph with n vertices and m edges. Graph can contain multiple edges, but can n 阅读全文
摘要:
给定n个正整数a1,a2,…,an,求 的值(答案模10^9+7)。 Input 第一行一个正整数n。 接下来n行,每行一个正整数,分别为a1,a2,…,an。 Output 仅一行答案。 Sample Input Sample Output Hint 1<=n<=10^5,1<=ai<=10^7。 阅读全文