思维
不凡_
我愿意冒险,不辜负每一次的Error.
展开
-
CodeForces - 652B
A student of z-school found a kind of sorting called z-sort. The array a with n elements are z-sorted if two conditions hold:ai ≥ ai - 1 for all even i,ai ≤ ai - 1 for all odd i > 1.For exampl原创 2018-02-02 20:09:27 · 179 阅读 · 0 评论 -
A - Maximal Binary Matrix CodeForces - 803A
You are given matrix with n rows and n columns filled with zeroes. You should put k ones in it in such a way that the resulting matrix is symmetrical with respect to the main diagonal (the diagonal th...原创 2018-02-08 16:44:05 · 191 阅读 · 0 评论 -
CodeForces - 912B. New Year's Eve
B. New Year's Evetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSince Grisha behaved well last year, at New Year's Eve he was visited by Ded Moroz...原创 2018-02-17 18:56:44 · 437 阅读 · 0 评论 -
HDU - 1702 - ACboy needs your help again!
ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart ACMer, you want to get ACboy out of the monster's...原创 2018-02-13 21:00:06 · 283 阅读 · 0 评论 -
HDU - 2553 B - N皇后问题
一天课下,张老板研究起了国际象棋,渴望完美的他更改了棋盘的大小,在N*N的方格棋盘放置了N个皇后,希望它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上) 张老板把这个艰巨的任务交给了你,对于给定的N,求出有多少种合法的放置方法。 Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行一个正...原创 2018-02-13 20:29:22 · 203 阅读 · 0 评论 -
CodeForces - 777C
During the lesson small girl Alyona works with one famous spreadsheet computer program and learns how to edit tables.Now she has a table filled with integers. The table consists of n rows and m column...原创 2018-02-11 20:38:20 · 184 阅读 · 0 评论 -
LightOJ - 1323
You are given a rectangular billiard board, L and W be the length and width of the board respectively. Unlike other billiard boards it doesn't have any pockets. So, the balls move freely in the board....原创 2018-02-11 20:29:15 · 244 阅读 · 0 评论 -
51Nod - 1009 1的数量
1009 数字1的数量基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题给定一个十进制正整数N,写下从1开始,到N的所有正数,计算出其中出现所有1的个数。例如:n = 12,包含了5个1。1,10,12共包含3个1,11包含2个1,总共5个1。Input输入N(1 Output输出原创 2018-02-06 11:33:15 · 148 阅读 · 0 评论 -
CodeForces - 834C. The Meaningless Game
C. The Meaningless Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSlastyona and her loyal dog Pushok are playing a meaningless game that is in...原创 2018-02-09 20:50:53 · 164 阅读 · 0 评论 -
CodeForces - 757B . Bash's Big Day - 贪心+暴力...也可因子数分解
Bash has set out on a journey to become the greatest Pokemon master. To get his first Pokemon, he went to Professor Zulu's Lab. Since Bash is Professor Zulu's favourite student, Zulu allows him to tak...原创 2018-02-09 20:37:23 · 150 阅读 · 0 评论 -
CodeForces - 870B - Maximum of Maximums of Minimums
B. Maximum of Maximums of Minimumstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a1原创 2018-02-04 20:46:22 · 238 阅读 · 0 评论 -
HDU - 1846 Brave Game
十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“勇敢者的游戏”,这也是我命名这个题目的原因。 当然,除了“勇敢”,我还希望看到“诚信”,无论原创 2018-02-04 20:21:28 · 268 阅读 · 0 评论 -
C - Maximal GCD CodeForces - 803C
You are given positive integer number n. You should create such strictly increasing sequence of k positive numbers a1, a2, ..., ak, that their sum is equal to n and greatest common divisor is maximal....原创 2018-02-08 17:04:22 · 257 阅读 · 0 评论