E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
coderforce
CoderForce
189A 割丝带(DP)
链接:clickhere题意:题目是给你一个多长的丝带,然后你要分成几段,且每段的长度必须满足等于a或者b或者c求这个最大的段数思路:比赛做完搜一下题解都说是DP,自己当时做的时候没有想到用DP,写了一个暴力循环,幸运的过了,想转移方程,死磕了一下午,还是没有搞出个所以然来,虽然代码不过20几行,先贴上标程,以后回过头来在好好想想代码: //暴力写法: intmain()//二成循环,枚举a和b
u013050857
·
2015-01-24 18:00
动态规划
ACM
coderforce
s 507A 贪心简单
背景:比赛时明显小看了第一题的难度,就想的一心ac,结果wa了三次,!!!!!!比赛就乱了!!要稳住,多给时间看题!!!思路:排序从最小的开始依次来减。但是要记录之前的位置,因为最终输出的是位置。我的记录方法是,把未排序之前的数组复制一份为sstr,对str排序之后,想要知道str中某个#include #include usingnamespacestd; intmain(void){ int
jibancanyang
·
2015-01-24 16:00
C++
ACM
coderforce
s #284(Div.2)
背景:第一次打
coderforce
s,只出了a,b两题·,c题在会长指导下过。A:水B:简单字符串处理C:题意是从A到B,不能走交叉点,求A到B最少要走的步数,等价于求与线段AB相交的直线个数。
jibancanyang
·
2015-01-04 20:00
C++
ACM
CF
coderforce
s 2B the least round way
分别按2和5dp一次,求到达每个位置时的2或5的最小个数#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglong#definelsrt>1#defineeps(1e-9)#def
ymrfzr
·
2013-05-28 15:00
dp
coderforce
coderforce
304a - Pythagorean Theorem II
暴力,枚举a,b的值,判断c的大小。。。。。。。。。。。但是为什么我的非暴力的代码就是不对呢????#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglong#definelsrt
ymrfzr
·
2013-05-15 06:00
Force
brute
coderforce
coderforce
306A Candies
分糖果。。。。。。。。。。。。#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglong#definelsrt>1#defineeps(1e-9)#definetypeint#de
ymrfzr
·
2013-05-15 06:00
模拟
coderforce
coderforce
296A Yaroslav and Permutations
不知道该怎么分类了,反正是水题。。。。。。#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglong#definelsrt>1#defineeps(1e-9)#definetype
ymrfzr
·
2013-05-13 07:00
模拟
coderforce
coderforce
282A Bit++
模拟水题。。。。。#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglong#definelsrt>1#defineeps(1e-9)#definetypeint#definecl
ymrfzr
·
2013-05-09 23:00
模拟
coderforce
coderforce
3A-Shortest path of the king
简单的贪心,不过一直追求简单一点再简单一点,所以有点纠结#include#includeintmain(){ intx,y,i,k,t;chars1[3],s2[3]; while(~scanf("%s",s1)){ scanf("%s",s2); x=s2[0]-s1[0]; y=s2[1]-s1[1]; k=(x>0?x:-x); t=(y>0?y:
ymrfzr
·
2013-05-01 22:00
coderforce
贪心greedy
coderforce
1c--Ancient Berland Circusp
一道几何题,先是海伦定理:三角形三边为a,b,c, 外接圆半径为R; p=(a+b+c)/2; S=sqrt(p*(p-a)*(p-b)*(p-c));再由正弦定理:S=a*b*c/(4*R); 由 推出。由上述公式可求出外接圆半径R;再由余弦定理: 求出三角形中的其中2个边对应的圆心角的大小(即2个半径R和一条三角形边组成的三角形),另外一角可由2pie减去已求出的2角。3角均求出之后,再求3
ymrfzr
·
2013-04-30 19:00
几何
coderforce
coderforce
2A-Winner
变态的模拟啊,刚开始没理解好题意,WA了无数遍,看了讲解才明白的#include #include #include #include #include #include #include #include #include #include #defineMAX1005usingnamespacestd;mapma,mb;intn,m,x,i,score[MAX]; charc[MAX][40]
ymrfzr
·
2013-04-28 12:00
模拟
coderforce
coderforce
1B-Spreadsheet
在十进制与一个很像26进制的进制之间转换,b--的情况刚开始没考虑到,很纠结#include #include intmain(){ intn,i,j,flag1,flag2,a,b,k;charc[20],d[20],t[10]; scanf("%d",&n); while(n--){ scanf("%s",c); i=0;flag1=0,flag2=0; while(c[i]>='A'&&c[
ymrfzr
·
2013-04-27 07:00
coderforce
Coderforce
s 192 B
弄两个数组a,b,将a数组复制到b,先把b排序,然后从依次减去b数组的数值,小于0的不能走,看指针是否能从1到达n,当第一个满足条件得数出现时即为听别人说此题也可用动态规划,不过我没想出来。。。T_T.....ViewCode1#include 2#include 3#include 4 5 6intcmp(constvoid*a,constvoid*b) 7{ 8return*(i
·
2012-08-10 11:00
code
Coderforce
s 204A
此题比赛时没有好的方法不会做,最后从别人那里学到了一个好的方法,就是从小到大慢慢数,从11到99开始数数,直到l 2#include 3#include 4#include 5#include 6#include 7 8usingnamespacestd; 9 10intmain() 11{ 12inti,j; 13longlonga,b; 14longlongx,l,r
·
2012-08-10 10:00
code
Coderforce
,the first time
Coderforce
,thefirsttimeA就是分数化简注意一下就好,gcdB.暴力,1个trick,当时间相同时要求的是到学校距离最小的那个站#include#includeusing namespace
The Fourth Dimension Space
·
2010-04-12 00:00
上一页
1
2
3
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他