随笔分类 -  ACM水题

摘要:``` include include include using namespace std; const int INF=0x3f3f3f3f; const int maxn=10005; int perm[maxn]; bool used[maxn]; int n; void permutat 阅读全文
posted @ 2018-02-12 13:57 Zireael 阅读(591) 评论(0) 推荐(0)
摘要:Eleven wants to choose a new name for herself. As a bunch of geeks, her friends suggested an algorithm to choose a name for her. Eleven wants her name 阅读全文
posted @ 2018-01-30 22:30 Zireael 阅读(335) 评论(0) 推荐(0)
摘要:A boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set. Here's a 4 阅读全文
posted @ 2017-11-30 19:24 Zireael 阅读(231) 评论(0) 推荐(0)
摘要:Hands that shed innocent blood! There are n guilty people in a line, the i th of them holds a claw with length Li. The bell rings and every person kil 阅读全文
posted @ 2017-11-27 21:08 Zireael 阅读(303) 评论(0) 推荐(0)
摘要:Vlad likes to eat in cafes very much. During his life, he has visited cafes n times. Unfortunately, Vlad started to feel that his last visits are not 阅读全文
posted @ 2017-11-22 15:10 Zireael 阅读(286) 评论(0) 推荐(0)
摘要:Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can. 阅读全文
posted @ 2017-11-20 20:29 Zireael 阅读(1286) 评论(0) 推荐(0)
摘要:Problem Description A permutation p1,p2,...,pn of 1,2,...,n is called a lucky permutation if and only if pi≡0(mod|pi−pi−2|) for i=3...n. Now you need 阅读全文
posted @ 2017-11-12 09:32 Zireael 阅读(759) 评论(0) 推荐(0)
摘要:Problem Description Here N (N ≥ 3) rabbits are playing by the river. They are playing on a number line, each occupying a different integer. In a singl 阅读全文
posted @ 2017-11-04 15:49 Zireael 阅读(792) 评论(0) 推荐(0)
摘要:You are given a multiset of n integers. You should select exactly k of them in a such way that the difference between any two of them is divisible by 阅读全文
posted @ 2017-11-02 21:08 Zireael 阅读(212) 评论(0) 推荐(0)
摘要:Recently, Dima met with Sasha in a philatelic store, and since then they are collecting coins together. Their favorite occupation is to sort collectio 阅读全文
posted @ 2017-10-29 15:32 Zireael 阅读(216) 评论(0) 推荐(0)
摘要:There are some ambiguities when one writes Berland names with the letters of the Latin alphabet. For example, the Berland sound u can be written in th 阅读全文
posted @ 2017-10-26 14:18 Zireael 阅读(277) 评论(0) 推荐(0)
摘要:Polycarp has interviewed Oleg and has written the interview down without punctuation marks and spaces to save time. Thus, the interview is now a strin 阅读全文
posted @ 2017-10-21 09:07 Zireael 阅读(184) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2017-10-13 19:35 Zireael 阅读(211) 评论(0) 推荐(0)
摘要:C. Bus time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output A bus moves along the coordinate line 阅读全文
posted @ 2017-10-06 10:07 Zireael 阅读(221) 评论(0) 推荐(0)
摘要:B. Ilya and Queries time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Ilya and Queries 阅读全文
posted @ 2017-06-14 15:19 Zireael 阅读(521) 评论(0) 推荐(0)
摘要:时间限制:1秒 空间限制:32768K 时间限制:1秒 空间限制:32768K 一个数轴上共有N个点,第一个点的坐标是度度熊现在位置,第N-1个点是度度熊的家。现在他需要依次的从0号坐标走到N-1号坐标。但是除了0号坐标和N-1号坐标,他可以在其余的N-2个坐标中选出一个点,并直接将这个点忽略掉,问 阅读全文
posted @ 2017-06-11 19:30 Zireael 阅读(674) 评论(0) 推荐(0)
摘要:A. An abandoned sentiment from past time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. An 阅读全文
posted @ 2017-06-08 19:02 Zireael 阅读(329) 评论(0) 推荐(0)
摘要:D. Dasha and Very Difficult Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. D 阅读全文
posted @ 2017-06-02 18:41 Zireael 阅读(226) 评论(0) 推荐(0)
摘要:A. Towers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Towers time limit per test 阅读全文
posted @ 2017-05-02 19:09 Zireael 阅读(436) 评论(0) 推荐(0)