10 2015 档案
摘要:题意: n * m的棋盘, k个位置有"rook"(车),q次询问,问是否询问的方块内是否每一行都有一个车或者每一列都有一个车? 满足一个即可先考虑第一种情况, 第二种类似,swap一下就可以了。#include using namespace std;const int maxn = 1e5 + ...
阅读全文
摘要:题意:一个n个点的数, m个人住在其中的某些点上, 每个人的标号1-m, 询问u-v 路径上标号前a个人,并输出标号,a using namespace std;const int maxn = 1e5 + 5;const int maxdep = 20;int par[maxdep][maxn],...
阅读全文
摘要:题意:n个线段[Li, Ri], m次询问, 每次询问由cnt个点组成,输出包含cnt个点中任意一个点的线段的总数。由于是无修改的,所以我们首先应该往离线上想, 不过我是没想出来。首先反着做,先求不包含这个cnt个点的线段的总数, 那么不包含这些点的线段必然在cnt个点之间(这里需要再加两个点一个是...
阅读全文
摘要:D. Little Pony and Harmony ChestPrincess Twilight went to Celestia and Luna's old castle to research the chest from the Elements of Harmony.A sequence...
阅读全文
摘要:C. Appleman and a Sheet of PaperAppleman has a very big sheet of paper. This sheet has a form of rectangle with dimensions1 × n. Your task is help App...
阅读全文
摘要:B. A Lot of GamesAndrew, Fedor and Alex are inventive guys. Now they invent the game with strings for two players.Given a group ofnnon-empty strings. ...
阅读全文

浙公网安备 33010602011771号