B. Kuroni and Simple Strings time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Now that Kuroni has reached 10 years old, he is a big boy and doesn't like arrays of integers as presents anymore. T…
After getting AC after 13 Time Limit Exceeded verdicts on a geometry problem, Kuroni went to an Italian restaurant to celebrate this holy achievement. Unfortunately, the excess sauce disoriented him, and he's now lost! The United States of America ca…
To become the king of Codeforces, Kuroni has to solve the following problem. He is given n numbers a1,a2,-,an. Help Kuroni to calculate ∏1≤i<j≤n|ai−aj|. As result can be very big, output it modulo m. If you are not familiar with short notation, ∏1≤i<…
the i-th necklace has a brightness ai, where all the ai are pairwise distinct (i.e. all ai are different), the i-th bracelet has a brightness bi, where all the bi are pairwise distinct (i.e. all bi are different). Kuroni wants to give exactly one nec…
2017-08-25 15:32:14 writer:pprp 题目: B. Rectangles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given n × m table. Each cell of the table is colored white or black. Find the numbe…
目录 Triple Sort Sorting Vases Buying a New String Chef and Bitwise Product Binary Land Not a Real World Problem Chef and Rainbow Roadsolved Precise Bipartite Pairing Precise Pairing 又咸了一场比赛... 这次除了 Challenge 还有两道都不会,自闭了... stO 陈阿克 rank < 5 Triple Sort…
目录 Missing a Point Chefina and Swaps Doctor Chef Chef and Dragon Dens LCM Constraints Weird Product Expected Repetitions Expected Spanning Trees 要看题解可以看 FSYo 写的,反正都是他跟我讲的做法,我一道都不会. Missing a Point 模拟. code Chefina and Swaps 贪心. code Doctor Chef dp. c…
目录 The Tom and Jerry Game! Operations on a Tuple The Delicious Cake Convenient Airports Guessing Game Danya and Different Values Perfect Partitions Even Matrix The Tom and Jerry Game! 模拟. code Operations on a Tuple 特判. code The Delicious Cake 凸包模板. c…
B. Making a String 题目连接: http://codeforces.com/contest/624/problem/B Description You are given an alphabet consisting of n letters, your task is to make a string of the maximum possible length so that the following conditions are satisfied: the i-th…
题意:给出一堆元素,求一个子集,使子集的乘积最大,如有多个,应该使子集元素个数尽量小. 题解:贪心,如果有大于1的正数,那么是一定要选的,注意负数也可能凑出大于1的正数,那么将绝对值大于1的负数两两配对, 如果还剩下一个绝对值大于1的负数,那么在判断一下,那个负数和比它大的最小负数的乘积是否大于1,如果是那么就选这两个. 把所有可能凑成大于1的数选完以后,剩下的数一定比1小,那么就不选. 如果无法凑出大于1的数,那么再分类讨论一下. 挺容易写错... #include<bits/stdc++.h…