![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
笨鸟1号
张占文
展开
-
Codeforces Round #551 (Div. 2)D. Serval and Rooted Tree
D. Serval and Rooted Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNow Serval is a junior high school student in Japari Mi...原创 2019-11-15 16:11:52 · 82 阅读 · 0 评论 -
J-Princess Principal_牛客网
https://ac.nowcoder.com/acm/contest/201/J题目描述 阿尔比恩王国(the Albion Kingdom)潜伏着一群代号“白鸽队(Team White Pigeon)”的间谍。在没有任务的时候,她们会进行各种各样的训练,比如快速判断一个文档有没有语法错误,这有助于她们鉴别写文档的人受教育程度。这次用于训练的是一个含有n个括号的文档。括号一共有m种,每...原创 2019-01-19 18:07:32 · 279 阅读 · 0 评论 -
杭电 hdu 2089 不要62【数位dp】【入门】
不要62Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 65269Accepted Submission(s): 25991Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。...原创 2019-04-03 20:50:59 · 92 阅读 · 0 评论 -
Super Jumping! Jumping! Jumping!
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1087Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5530...原创 2019-04-08 13:59:41 · 101 阅读 · 0 评论 -
hdu-3466_Proud Merchants(动态规划)
题目链接Proud MerchantsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 8757Accepted Submission(s): 3684Problem DescriptionRecently, ...原创 2019-04-15 23:47:28 · 124 阅读 · 0 评论 -
免费馅饼 hdu 1176
题目链接:点击这里免费馅饼Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 71705Accepted Submission(s): 25160Problem Description都说天上不会掉馅饼,但有一天g...原创 2019-04-09 18:09:26 · 143 阅读 · 0 评论 -
hdu Dollar Dayz 高精度完全背包
题目链接Dollar DayzTime Limit:1000MS Memory Limit:65536K Total Submissions:10456 Accepted:3852 DescriptionFarmer John goes to Dollar Days at The Cow Store and discovers an u...原创 2019-04-14 21:02:01 · 164 阅读 · 0 评论 -
nowcoder—2019牛客暑期多校训练营(第一场) E题 ABBA (动态规划前缀方案和)
https://ac.nowcoder.com/acm/contest/881/E链接:https://ac.nowcoder.com/acm/contest/881/E来源:牛客网题目描述Bobo has a string of length 2(n + m) which consists of characters `A` and `B`. The string ...原创 2019-07-19 00:58:58 · 585 阅读 · 0 评论 -
牛客假日团队赛10 A 方格取数
方格取数,牛客网传送门题目描述设有N*N的方格图(N ≤ 10,我们将其中的某些方格中填入正整数,而其他的方格中则放入数字0。如下图所示(见样例):某人从图的左上角的A 点出发,可以向下行走,也可以向右走,直到到达右下角的B点。在走过的路上,他可以取走方格中的数(取走后的方格中将变为数字0)。此人从A点到B 点共走两次,试找出2条这样的路径,使得取得的数之和为最大。输入描...原创 2019-08-12 17:50:35 · 171 阅读 · 0 评论 -
2019年牛客网暑期多校训练赛第一场 I Points Division动态规划+线段树优化
链接:https://ac.nowcoder.com/acm/contest/881/I来源:牛客网Points Division时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld题目描述Bobo has a set P of n distinct points (x1,y1)...原创 2019-08-26 23:31:13 · 185 阅读 · 0 评论 -
小乐乐下象棋-牛客网
https://ac.nowcoder.com/acm/con链接:https://ac.nowcoder.com/acm/contest/301/G?&headNav=acm来源:牛客网 题目描述 小乐乐觉得学习太简单了,剩下那么多的时间好无聊,于是便想打游戏。 最近新出了一个特别火的游戏,叫吃猪,小乐乐准备玩一玩。 吃猪游戏很简...原创 2018-12-03 13:56:21 · 247 阅读 · 0 评论 -
HDU 1686
https://cn.vjudge.net/contest/251436#problem/B#include<stdio.h>#include<algorithm>#include<iostream>#include<string.h>using namespace std;char a[1000010],b[10010];i...原创 2018-10-15 20:45:08 · 151 阅读 · 0 评论 -
You can Solve a Geometry Problem too
Many geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this final exam. According to the experience of many ACMers, geometry problems are always much t...原创 2018-08-10 14:51:54 · 110 阅读 · 0 评论 -
Shape of HDU
话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,“徐队”的称呼逐渐被“徐总”所取代,海东集团(HDU)也算是名副其实了。 创业是需要地盘的,HDU向钱江肉丝高新技术开发区申请一块用地,很快得到了批复,据说这是因为他们公司研发的“海东牌”老鼠药科技含量很高,预期将占全球一半以上的市场。政府划拨的这块用地是一个多边形,为了描述它,我们用逆时针方向的顶点序列来表示,我们...原创 2018-08-10 16:24:22 · 125 阅读 · 0 评论 -
HDU 1072 记忆化搜
https://cn.vjudge.net/problem/15705/origindfs的一道好题,注意减枝题意:要求从第一个星球遍历访问其他星球,然后输出遍历每个星球所用时间的总和,就酱 #include<stdio.h>#include<string.h>#include<iostream>#include<algorithm...原创 2018-08-15 12:09:10 · 102 阅读 · 0 评论 -
欧拉函数求法
int oula(int n) { //O(n) int rea = n; for (int i = 2; i <= n; i ++) { if(n % i == 0) { rea = rea - rea/i; do{ n /= i; }while(n %...转载 2018-08-08 17:37:55 · 192 阅读 · 0 评论 -
Farey Sequence
http://poj.org/problem?id=2478 求欧拉值的前n项和 DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gc...原创 2018-08-08 17:49:14 · 286 阅读 · 0 评论 -
hdu_1969 二分
http://acm.hdu.edu.cn/showproblem.php?pid=1969My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F o...原创 2018-08-18 11:35:33 · 130 阅读 · 0 评论 -
南阳oj题目289,01背包
苹果时间限制:3000 ms | 内存限制:65535 KB难度:3输入有多组测试数据,每组测试数据第一行为2个正整数,分别代表苹果的个数n和背包的容量v,n、v同时为0时结束测试,此时不输出。接下来的n行,每行2个正整数,用空格隔开,分别代表苹果的大小c和价钱w。所有输入数字的范围大于等于0,小于等于1000。输出对每组测试数据输出一个整数,代表能放入背包的苹果的总价...原创 2018-08-16 19:35:26 · 356 阅读 · 0 评论 -
NYOJ814 又见拦截导弹
http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=814 又见拦截导弹时间限制:3000 ms | 内存限制:65535 KB难度:3输入有多组测试数据。每组数据先输入一个整数N(N≤3000),代表有N发导弹来袭。接下来有N个数,分别代表依次飞来的导弹的导弹的高度。当N=-1时表示输入结束。输出每组...原创 2018-08-26 19:24:59 · 149 阅读 · 0 评论 -
快速幂×快速乘
快速乘的速度并不能加速两个数相乘,但是可以防止数据超过long long 而最大化速度#include<bits/stdc++.h>using namespace std;#define ll long long#define maxn 10ll quikly1(ll ans,ll i,ll m)///快速乘{ ll an1=0; while(...原创 2018-08-25 10:04:36 · 423 阅读 · 0 评论 -
判断多边形面积(正负)
“ 改革春风吹满地, 不会AC没关系; 实在不行回老家, 还有一亩三分地。 谢谢!(乐队奏乐)” 话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里雾里,而且,还竟然来这么几句打油诗。 好呀,老师的责任就是帮你解决问题,既然想种田,那就分你一块。 这块田位于浙江省温州市苍南县灵溪镇林家铺子村,多边形形状的一块地,原本是linle 的,现在就准备送给你了。不过,任何...原创 2018-08-10 12:42:53 · 613 阅读 · 0 评论