随笔分类 - 算法基础—二分
摘要:题目描述 The only difference between easy and hard versions is constraints. You are given a sequence a a a consisting of n n n positive integers. Let's de
阅读全文
摘要:The next lecture in a high school requires two topics to be discussed. The ii -th topic is interesting by aiai units for the teacher and by bibi units
阅读全文
摘要:There is a frog staying to the left of the string s=s1s2…sns=s1s2…sn consisting of nn characters (to be more precise, the frog initially stays at the
阅读全文
摘要:Problem Statement Takahashi will take part in an eating contest. Teams of NN members will compete in this contest, and Takahashi's team consists of NN
阅读全文
摘要:问题描述 数轴上有n个闭区间D1,…,Dn。其中区间Di用一对整数[ai, bi]来描述,满足ai < bi。已知这些区间的长度之和至少有10000。所以,通过适当的移动这些区间,你总可以使得他们的“并”覆盖[0, 10000]——也就是说[0, 10000]这个区间内的每一个点都落于至少一个区间内
阅读全文
摘要:After a long party Petya decided to return home, but he turned out to be at the opposite end of the town from his home. There are nn crossroads in the
阅读全文