摘要:
题意 有AGTC四种字符,一开始有一个空串,每次操作,可以在首或尾加任意个字符,或者将已有字符镜面复制(左右两种复制方法),要求最少的操作步数使得得到给出的字符串 Solution: 我们要知道我们要求的是什么,是每一给回文串的所需要的最少的构造操作加上n-这个串的长度 然后就考虑如何求前者 题解: 阅读全文
摘要:
As an eligible Ingress Resistance Agent you should know your power source, the Exotic Matter. We call it XM, which is the driving force behind all of 阅读全文
摘要:
题解+CODE:https://blog.csdn.net/CrazyForsaken/article/details/100186979 积性函数线性筛 阅读全文
摘要:
Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points. Input The 阅读全文
摘要:
题面Bessie, Farmer John’s prize cow, has just won first place in a bovine beauty contest, earning the title ‘Miss Cow World’. As a result, Bessie will m 阅读全文
摘要:
题目链接:http://codeforces.com/gym/101190 SOLUTION: 模拟费用流 这题看完之后很容易想到费用流,但是n太大了不能直接跑。 我们考虑模拟这个费用流的增广过程,每次多了一条S->x的容量为1,费用为0的边后,我们要找一条费用最低的x->T的路径来增广,也就是要在 阅读全文
摘要:
Problem Description You are given a string S consisting of only lowercase english letters and some queries.For each query (l,r,k), please output the s 阅读全文
摘要:
There are nn pirate chests buried in Byteland, labeled by 1,2,…,n1,2,…,n. The ii-th chest's location is (xi,yi)(xi,yi), and its value is wiwi, wiwi ca 阅读全文
摘要:
题目链接:http://codeforces.com/gym/101490/attachments SOLUTION: 其实就是一个模拟,但是难点是如何操作 CODE: 阅读全文