![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM思维题
PCCCCC
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #648 (Div. 2) D
D. Solve The Mazetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVivek has encountered a problem. He has a maze that can be represented as ann×mn×mgrid. Each of the grid cells may rep..原创 2020-06-08 17:26:00 · 220 阅读 · 0 评论 -
cideforces 1143C(思维题)
You are given a rooted tree with vertices numerated from11tonn. A tree is a connected graph without cycles. A rooted tree has a special vertex named root.Ancestors of the vertexiiare all vertic...原创 2019-05-21 16:13:41 · 283 阅读 · 1 评论 -
XOR-pyramid (思维题+区间dp)
For an array bb of length mm we define the function ff asf(b)={b[1]f(b[1]⊕b[2],b[2]⊕b[3],…,b[m−1]⊕b[m])ifm=1otherwise,f(b)={b[1]ifm=1f(b[1]⊕b[2],b[2]⊕b[3],…,b[m−1]⊕b[m])otherwise,where ⊕⊕ is bit...原创 2019-04-30 22:49:52 · 291 阅读 · 0 评论 -
一个求所有约数的小技巧
复杂度为sqrt(n)i遍历1-sqrt(n),若i为约数,则n / i也为约数原创 2019-04-28 20:36:22 · 1546 阅读 · 0 评论 -
CodeForces - 1005D (思维题)
Polycarp likes numbers that are divisible by 3.He has a huge number ss. Polycarp wants to cut from it the maximum number of numbers that are divisible by 33. To do this, he makes an arbitrary number...原创 2019-04-19 09:35:11 · 223 阅读 · 1 评论 -
CodeForces - 1040B (思维题)
代码极其简短#include<iostream>#include <stdio.h>using namespace std;const int MAX = 1005;int a[MAX];int main(){ int n, k; scanf("%d%d", &n, &k); int cnt = n / (2 * ...原创 2019-04-12 23:53:28 · 234 阅读 · 0 评论 -
CodeForces - 1013D (并查集)
Innopolis University scientists continue to investigate the periodic table. There are n·m known elements and they form a periodic table: a rectangle with n rows and m columns. Each element can be desc...原创 2019-04-03 01:21:21 · 451 阅读 · 0 评论 -
CodeForces - 719B (思维题)
Anatoly lives in the university dorm as many other students do. As you know, cockroaches are also living there together with students. Cockroaches might be of two colors: black and red. There are n co...原创 2019-04-03 01:14:56 · 314 阅读 · 0 评论 -
Books Queries CodeForces - 1066C
You have got a shelf and want to put some books on it.You are given qq queries of three types:L idid — put a book having index idid on the shelf to the left from the leftmost existing book; R idi...原创 2019-03-30 21:19:03 · 198 阅读 · 0 评论 -
CodeForces - 621B (思维题)
Today, Wet Shark is given n bishops on a 1000 by 1000 grid. Both rows and columns of the grid are numbered from 1 to 1000. Rows are numbered from top to bottom, while columns are numbered from left to...原创 2019-04-04 00:37:55 · 193 阅读 · 0 评论 -
CodeForces - 617C ( 思维 + 暴力求解)
A flowerbed has many flowers and two fountains.You can adjust the water pressure and set any values r1(r1 ≥ 0) and r2(r2 ≥ 0), giving the distances at which the water is spread from the first and se...原创 2019-04-04 00:25:32 · 512 阅读 · 0 评论 -
CodeForces - 617B (思维题)
Bob loves everything sweet. His favorite chocolate bar consists of pieces, each piece may contain a nut. Bob wants to break the bar of chocolate into multiple pieces so that each part would contain ex...原创 2019-04-04 00:11:28 · 193 阅读 · 0 评论