![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
水题
Lngxling
这个作者很懒,什么都没留下…
展开
-
CodeForces - 580A Kefa and First Steps —— 最长上升子序列
A. Kefa and First Stepstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKefa decided to make some money doi原创 2017-09-24 21:26:21 · 314 阅读 · 0 评论 -
CodeForces - 633B A Trivial Problem
题意:问所有x,使得x阶乘的末尾恰好有n个0思路:计算阶乘的末尾0的个数就是计算这个数中有多少个5的倍数然后直接暴力就可以了#include <iostream>#include <cstdio>#include <cmath>#include <vector>#include <map>#include ...原创 2018-10-02 09:55:39 · 226 阅读 · 0 评论 -
CodeForces - 618B Guess the Permutation
题意:矩阵里bij=min(ai,aj)求满足条件的a数组思路:胡乱搞一下,每行出现次数最多的数就是数组这个这个位置的数,最后剩两个出现都出现一次的,一个放n一个放n-1#include <iostream>#include <cstdio>#include <cmath>#include <vector>#includ...原创 2018-10-02 09:40:39 · 253 阅读 · 0 评论 -
HDU - 5478 Can you find it
题意:求满足题目式子的所有a,b对思路:暴力打表可以发现,若满足n=1和n=2,则对于大于2的n都满足因为a和b都小于c,直接暴力所有可能的情况#include <bits/stdc++.h>using namespace std;#define ll long longll c,k1,k2,b1;int casnum=1;struct node{ ...原创 2018-09-16 21:18:58 · 136 阅读 · 0 评论 -
HDU - 5879 Cure
题意:求 1<=i<=n 1/(i*i)的和 n很大思路:1M=1e6B 位数~=1e6/4B当n特别大的时候,n*n就已经很小了,几乎不影响结果,所以暴力跑一下1e6以内的数据题目只让输出到小数点后5位,不要多输出...#include <bits/stdc++.h>using namespace std;#define ll long l...原创 2018-08-30 13:26:13 · 162 阅读 · 0 评论 -
CodeForces - 711B Chris and Magic Square 水题
题意:给矩阵中0位置填数,问能不能使得矩阵的每一行的和、每一列的和、两个对角线的和都相等。保证矩阵中只有一个0.思路:从行和和列和计算出0位置要填的数,再判断对角线开始读错了题意WA了好几发...#include <bits/stdc++.h>#define ll long longusing namespace std;int n;ll row[60...原创 2018-08-29 10:54:32 · 208 阅读 · 0 评论 -
HDU - 1564 Play a game
Play a gameTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3383 Accepted Submission(s): 2748Problem DescriptionNew Year is Co原创 2018-02-05 21:05:00 · 206 阅读 · 0 评论 -
CodeForces - 908A New Year and Counting Cards
A. New Year and Counting Cardstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYour friend has n cards.Y原创 2018-02-05 20:54:02 · 160 阅读 · 0 评论 -
CodeForces - 915B Browser
B. Browsertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLuba is surfing the Internet. She currently has n原创 2018-01-23 21:12:51 · 301 阅读 · 0 评论 -
CodeForces - 361A Levko and Table
A. Levko and Tabletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLevko loves tables that consist of n rows原创 2017-12-13 20:04:15 · 257 阅读 · 0 评论 -
CodeForces - 362B Petya and Staircases
B. Petya and Staircasestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle boy Petya loves stairs very m原创 2017-12-13 20:02:32 · 310 阅读 · 0 评论 -
CodeForces - 681B Economy Game
B. Economy Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKolya is developing an economy simulator gam原创 2017-12-19 22:07:20 · 216 阅读 · 0 评论 -
51Nod - 1420 数袋鼠好有趣——贪心
1420 数袋鼠好有趣题目来源: CodeForces基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题有n只袋鼠。每只袋鼠的大小用一个整数表示。一只小袋鼠能装进一只大袋鼠的条件是,大袋鼠的大小至少是小袋鼠的两倍。每只大袋鼠最多可以装一只袋鼠。小袋鼠被装进大袋鼠之后就不能再装其它的袋鼠了。小袋鼠被装进大原创 2017-09-10 20:01:34 · 311 阅读 · 0 评论 -
CodeForces - 747C Servers——贪心
C. Serverstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n servers in a laboratory, each of the原创 2017-09-11 15:25:17 · 387 阅读 · 0 评论 -
CodeForces - 330B Road Construction —— 水题
B. Road Constructiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA country has n cities. Initially, the原创 2017-09-27 19:02:46 · 556 阅读 · 0 评论 -
CodeForces - 767A Snacktower
A. Snacktowertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAccording to an old legeng, a long time ago A原创 2017-09-26 23:37:06 · 421 阅读 · 0 评论 -
HDU - 5979 Convex —— 几何计算
题意:多边形每个顶点到原点的距离都是d,已知两两相邻线段的夹角,问多边形的面积思路:两两相邻线段可以形成一个等腰三角形,知道顶角的度数,可以求面积多边形的面积就是每个小等腰三角形的面积之和#include <iostream>#include <cstdio>#include <cmath>#include <vector>...原创 2018-09-30 09:27:28 · 191 阅读 · 0 评论