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
bestcoder
BestCoder
Round #33——1001——zhx's submissions
问题描述 作为史上最强的刷子之一,zhx在各大oj上交了很多份代码,而且多数都AC了。 有一天,zhx想数一数他在n个oj上一共交了多少份代码。他现在已经统计出在第i个oj上,他交了ai份代码。而把它们加起来就是你的工作了。 当然zhx是一个不走寻常路的人,所以他的数字都是用B进制表示的。而他也要求你告诉他B进制的数。 但是zhx有一个恶趣味的习惯,他算加法的时候从来不进位。比如他算十进制5
·
2015-11-07 10:12
round
BestCoder
1st Anniversary 1004 Bipartite Graph 【二分图 + bfs + 良好的逻辑思维 】
题目地址: http://
bestcoder
.hdu.edu.cn/contests/contest_showproblem.php?
·
2015-11-07 10:29
Graph
BestCoder
Round #35
A 题意:给出n个黑球,m个白球,每次取1个球,取了n+m次以后,会生成一个随机的01串S, 如果第i次取出的是黑球,则s[i]=1,如果是白色的,那么s[i]=0, 问01串在S中出现的期望次数 大概可以这样算,是因为取出一个01串之后,其他的有两个01串,三个01串,四个01串的情况都包含在里面,所以只需要算出一个01串的有多少种情况就可以了 1 #inclu
·
2015-11-07 10:54
round
卡题小结
(写于 2014年 11月 23日) 从昨晚打
BestCoder
到今天的Running IT Youth(定向越野编程比赛),各种卡题痛苦挣扎过后,现在来稍微小结一下: 目前找到的卡题原因大概有如下几点
·
2015-11-02 17:06
小结
BestCoder
Round #40 1001——精度——Tom and paper
Problem Description There is a piece of paper in front of Tom, its length and width are integer. Tom knows the area of this paper, he wants to know the minimum perimeter of this paper. Input
·
2015-11-02 16:00
round
赛码"
BestCoder
"杯中国大学生程序设计冠军赛1009——邻接表+并查集——Exploration
Problem Description Miceren likes exploration and he found a huge labyrinth underground! This labyrinth has N caves and some tunnels connecting some pairs of caves. There are two types
·
2015-11-02 16:51
code
赛码"
BestCoder
"杯中国大学生程序设计冠军赛1001——Movie
Problem Description Cloud and Miceren like watching movies. Today, they want to choose some wonderful scenes from a movie. A movie has N scenes can be chosen, and each scene is associate
·
2015-11-02 16:50
code
赛码"
BestCoder
"杯中国大学生程序设计冠军赛1005——DP——Game
Problem Description BrotherK is very rich. He has a big company. One day, BrotherK wants to give an award to one of the employees in the company. It's so hard to make a choise that BrotherK decide
·
2015-11-02 16:50
code
BestCoder
Round #46
1001 YJC tricks time 题目链接:1001 题意:给你时针和分针所成的角度,输出现在的时间,以10秒为单位 思路:每10秒,分针走1度,时针走分针的1/12,我们可以根据时间来分别计算出分针和时针走的度数(分针可能走多圈),然后计算出二者的夹角(按题目的格式*12000) 我们可以得到一张时间对夹角的map表,对于输入的夹角,去map中查找是否存在对应的时间即可
·
2015-11-02 16:11
round
BestCoder
Round #47
1001 Senior's Array 题目链接:1001 题意:给你一个长度为n的序列,你必须修改序列中的某个数为P,求修改后的最大连续子序列和。 思路:数据量比较小,可以直接暴力做, 枚举序列的每个数修改成P,然后更新最大子序列和。 code: 1 #include <iostream> 2 #include <algorithm> 3
·
2015-11-02 16:11
round
[hdu5164]ac自动机
中文题目:http://
bestcoder
.hdu.edu.cn/contests/contest_chineseproblem.php?
·
2015-11-02 16:44
AC自动机
Bestcoder
Round#45
1001 给定数n,要我们求该数的二进制中有多少组1, 相邻的1称为1组, 直接位运算摸你即可 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <algorithm> 5 #include <iostream&g
·
2015-11-02 13:10
round
bestcoder
44#1002
这题采用分治的思想 首先,根据最后一位是否为1,将数分为两个集合, 集合与集合之间的lowbit为1, 然后将每个集合内的元素,倒数第二位是否为1,将数分为两个集合,集合与集合之间的lowbit为2 以此类推。 首先为什么要将数组进行排序,排序的规则是根据数字二进制数,从右到左,第一个不同的数字进行排序,0左,1右 1 #include
·
2015-11-02 13:08
code
矩阵快速幂---
BestCoder
Round#8 1002
当要求递推数列的第n项且n很大时,怎么快速求得第n项呢?可以用矩阵快速幂来加速计算。我们可以用矩阵来表示数列递推公式比如fibonacci数列 可以表示为 [f(n) f(n-1)] = [f(n-1) f(n-2)] [ 1 1 ] [ 1 0 ] 设A = [ 1
·
2015-11-02 13:33
round
从lca到树链剖分
bestcoder
round#45 1003
bestcoder
round#45 1003 题,给定两个点,要我们求这两个点的树上路径所经过的点的权值是否出现过奇数次。
·
2015-11-02 09:18
round
bestcoder
#61hdu5523Game
ProblemDescriptionXYisplayingagame:thereareNpillarinarow,whichnumberedfrom1ton.Eachpillarhasajewel.NowXYisstandingontheS-thpillarandtheexitisintheT-thpillar.XYcanleavefromtheexitonlyaftertheygetallthe
zhou_yujia
·
2015-11-01 18:00
HDU
杭电
BestCoder
HDU 5268 ZYB loves Score (简单模拟,水)
题意:计算
Bestcoder
四题的得分。 思路:直接模拟,4项分数直接计算后输出。注意不要低于百分之40的分。
·
2015-11-01 13:38
core
BestCoder
Round #61 (div.2)
A#include #include #include #include #include #include #include #include #include #include #include #include #include #include #defineMaxn128 #defineMOD typedeflonglongll; #defineFOR(i,j,n)for(inti=j;
Griffin_0
·
2015-11-01 11:00
BestCoder
BestCoder
Round #61 (div.2) 1002
情况有点多问题描述XY在玩一个游戏:有N根柱子排成一排,编号为1到N,每个柱子上面有一块宝石,现在XY站在第S根柱子上,出口在第T跟柱子上,XY需要拿到所有宝石后从出口离开。每次XY可以走到相邻的柱子上,也可以使用超能力跳到第一根柱子或者第N根柱子上,如果离开了柱子之后再也不能到达这里。为了节省能量,XY想用最少次数超能力通关。输入描述输入有多组数据,不超过1000组. 每组数据输入一行包含3个整
zyx520ytt
·
2015-10-31 23:00
BestCoder
Round #61 (div.2) 1001
问题描述给n个数{A}_{1},{A}_{2}....{A}_{n}A1,A2....An,从中选3个位置不同的数A,B和C,问是否有一种情况满足A-B=C.输入描述输入有多组数据,不超过1000组. 每组数据第一行包含一个整数n,随后一行n个整数{A}_{1},{A}_{2}....{A}_{n}A1,A2....An.(3\leqn\leq1003≤n≤10
zyx520ytt
·
2015-10-31 23:00
BestCoder
Round #41 1001——ZCC loves straight flush
Problem Description After losing all his chips when playing Texas Hold'em with Fsygd on the way to ZJOI2015, ZCC has just learned a black technology. Now ZCC is able to change all cards as he wants
·
2015-10-31 15:41
round
BestCoder
Round#8 1003
dp[i][j] 表示以i结尾的长度为j的递增子序列dp[i][j] = sum(dp[k][j]) k<i && a[i] >a[j]如果只是单纯的循环for(j=2; j<=m; ++j) for(i=1; i<=n; ++i) for(k=1; k<i; ++k) if(a[i]
·
2015-10-31 12:04
round
BestCoder
Round#11div2 1003
----- 有时候如果枚举起点超时,那么试试枚举终点。 枚举每一个i为终点(0<= i < n),且维护起点下标startPos 对于终点i,cnt[str[i]] ++, 如果小于等于k的话,那么以i为结尾的符合条件的字串的个数为i-startPos+1 如果大于k的话,改变区间下标startPos, 保证区间startPos-->i内相同
·
2015-10-31 12:04
round
2015百度之星资格赛题解
题目链接: http://
bestcoder
.hdu.edu.cn/contests/contest_show.php?cid=584 A.
·
2015-10-31 12:45
百度
hdu 5207
BestCoder
Round #38 ($) Greatest Greatest Common Divisor
#include<stdio.h> #include<string.h> #include<math.h> int flag[100005]; int a[100005]; int main() { int sb; scanf("%d", &sb); int u; for (u =
·
2015-10-31 10:01
round
HDU5311——字符串——Hidden String
Today is the 1st anniversary of
BestCoder
.
·
2015-10-31 10:44
String
hdu 5148 cities 树形DP
*******************************
bestcoder
题解********************************Cities 选出K个点v1,v2,...vK使得∑
·
2015-10-31 10:37
HDU
猜数字(规律)
欢迎参加——
BestCoder
周年纪念赛(高质量题目+多重奖励) 猜数字 Time Limit: 3000/1000 MS (Java/Others)  
·
2015-10-31 09:33
数字
BestCoder
Round #1 第二题 项目管理
// 第二题 我记得很久很久很久以前看过这样的题目,忘记是哪的区域赛了 // 记得有人说和节点度数有关,我记不清了,反正当时完全不懂 // 然后我想了想,估计就是更新节点度数有关,YY出来可能只要更新相邻节点度数更大或更小的就可以了 // 复杂度不知道多少,就是提交了试试,15MS就过了 // 看来就是这样了 // 具体就是求出每个节点度数,然后每次更新时,只要更新与自己相连,但度数比自
·
2015-10-31 09:52
round
BestCoder
Round #1 第一题 逃生
// 等了好久,
BESTCODER
终于出来了、、像咋这样的毕业的人、、就是去凑凑热闹// 弱校搞acm真是难,不过还是怪自己不够努力// 第一题是明显的拓扑排序,加了了个字典序限制而已// 用优先队列就可以搞定了
·
2015-10-31 09:52
round
BestCoder
Round #18
1001 Primes Problem 打个10^4的素数表,枚举前两个搞一下就好了。 #include<iostream> #include<cstdio> #include<cstring> #include<map> #include<vector> #include<stdlib.h>
·
2015-10-31 09:17
round
BestCoder
Round #27
Jump and Jump... Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 0 Accepted Submission(s):
·
2015-10-31 09:36
round
BestCoder
Round #29——A--GTY's math problem(快速幂(对数法))、B--GTY's birthday gift(矩阵快速幂)
GTY's math problem Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0
·
2015-10-31 09:36
round
BestCoder
1st Anniversary 1002-1005
1002 Hidden String这个题怎么暴力怎么搞就好了. 可以枚举最长匹配前缀, 和最长匹配后缀, 中间暴力for. 1 /*Author :usedrose */ 2 /*Created Time :2015/7/25 19:05:28*/ 3 /*File Name :2.cpp*/ 4 #include <cstdio> 5 #include
·
2015-10-30 16:39
code
hdu4585 &
BestCoder
Round #1 项目管理(vector应用)
主题链接:http://acm.hdu.edu.cn/showproblem.php?pid=4858 项目管理 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 760
·
2015-10-30 15:38
vector
hdu 5284
BestCoder
Round #48 ($) 1001 水题 *
题意:看一个字符串中是否包含顺序的 w y h ,字符之间可以有其他字符,并且如果有多个连续的vv,则可以看做一个w 比较水,直接看代码 1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #include<cstring&g
·
2015-10-30 14:19
round
hdu 5060 五种情况求圆柱体与球体交
pid=5060 官方题解http://
bestcoder
.hdu.edu.cn/给复杂了 实际上用圆柱体与球体体积差的积分公式(pi*r*r - pi*x*x)即可轻松解决五种情况 #include
·
2015-10-30 13:10
HDU
BestCoder
冠军赛 - 1009 Exploration 【Tarjan+并查集缩点】
【题意】 给一个图,这个图中既有有向边,又有无向边,每条边只能走一次,问图中是否存在环。 最多10^6个点,10^6个无向边,10^6个有向边 【题解】 因为既有有向边又有无向边,所以不能单纯的用tarjan判环,阻碍咱使用tarjan的主要还是无向边,显然不可以把无向边拆成两个有向边来搞,因为这条边只能走一次,拆成两条边可能来回分别走一次,就不满足题意了。 咱可以先处理
·
2015-10-30 13:57
code
BestCoder
冠军赛 - 1005 Game 【DP】
【题意】 给出一个set,set中有几个数。 现在给出n个人,环成一圈搞约瑟夫。。。 开始时从第1号报数,每次从set中随机选出一个数s,等报数到s后,报s的人出圈,其他人继续报数。 最后只剩1人时,他就胜出。 问最后可能有哪些人胜出,输出编号。 【解释】 设dp[i][j]为剩余i个人,并且该j号报数 则状态转移方程为 dp[i][ (j+s[i]-1
·
2015-10-30 13:57
code
bestcoder
#23 1001 Sequence
Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 712 Accepted Submission(s): 439 Problem De
·
2015-10-30 13:47
sequence
bestcoder
#23 1002 Sequence II 树状数组+DP
Sequence II Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 652 Accepted Submission(s): 164 Problem
·
2015-10-30 13:47
sequence
BestCoder
#15 A-LOVE(暴力)
Love Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 123 Accepted Submission(s): 90 Problem Descrip
·
2015-10-30 11:36
code
hdu 5310 Souvenir (水)
题意:今天是
BestCoder
一周年纪念日. 比赛管理员Soda想要给每个参赛者准备一个纪念品.
·
2015-10-30 10:12
HDU
HDU 5311 Hidden String (暴力)
题意:今天是
BestCoder
一周年纪念日. 比赛管理员Soda有一个长度为n的字符串s.
·
2015-10-30 10:12
String
【Fibonacci】
BestCoder
#28B Fibonacci
Fibonacci Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 795 Accepted Submission(s): 213 Problem D
·
2015-10-28 08:11
fibonacci
hdu 4908
BestCoder
Sequence 发现M中值是字符串数, 需要预处理
BestCoder
Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768
·
2015-10-27 16:33
sequence
BestCoder
1st Anniversary ($)
1001:Souvenir 题目描述: 水题,三种方案求最小值即可。 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <algorithm> 5 using namespace std; 6 int main (
·
2015-10-27 13:38
code
kiki's game
欢迎参加——
BestCoder
周年纪念赛(高质量题目+多重奖励) kiki's game Time Limit: 5000/1000 MS (Java/Others)
·
2015-10-27 12:06
game
hdu 5505 GT and numbers【
BestCoder
Round #60】
GTandnumbersTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):1066 AcceptedSubmission(s):285ProblemDescriptionYouaregiventwonumbers N and M.Everystepyouc
qingshui23
·
2015-10-24 15:00
最大公约数
GT and numbers(
BestCoder
Round #60)1002
GTandnumbers题意:给出两个数NNN和MMM。 NNN每次可以乘上一个自己的因数变成新的NNN。 求最初的NNN到MMM至少需要几步。 如果永远也到不了输出−1-1−1。 方法:若是N可以通过乘上自己的因数可以变成M,则M一定可以整除N。N在通过乘上自己的因数可以变成M的过程中,N通过乘以N,M的最大公约数就可以达到M,若此时的N与M的最大公约数为1,则永远达不到M;ProblemDes
Code_KK
·
2015-10-23 20:00
上一页
8
9
10
11
12
13
14
15
下一页
按字母分类:
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
其他