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
srm
SRM
582 Div II Level One: SemiPerfectSquare
题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12580 比较简单,代码如下: #include <iostream> #include <string> #include <cmath> using namespace std; c
·
2015-11-13 07:52
level
SRM
582 Div II Level Two SpaceWarDiv2
题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12556 #include <iostream> #include <vector> #include <algorithm> using namespace std; int F[50]
·
2015-11-13 07:52
level
SRM
582 Div II Level Three: ColorTheCells, Brute Force 算法
题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12581 Burte Force 算法,求解了所有了情况,注意 next_permutation 函数的用法。 #include <iostream> #include <vector> #inclu
·
2015-11-13 07:51
color
SRM
583 Div II Level One:SwappingDigits
题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12609 #include <iostream> #include <string> using namespace std; string minstr = ""; clas
·
2015-11-13 07:50
level
SRM
583 Div Level Two:IDNumberVerification
题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12610 这道题比较有意思,估计是中国人出的吧,以前都不知道身份证还这么麻烦,不过程序不难写。 #include <algorithm> #include <iostream> #include <queue>
·
2015-11-13 07:49
number
SRM
583 Div II Level Three:GameOnABoard,Dijkstra最短路径算法
题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12556 用Dijkstra实现,之前用Floyd算法写了一个,结果在2s内算不出结果来。 参考了别人算法,学到了set容器的一个用法,用set省去了查找Dijkstra算法中选择最短路径的那一步,set中的第一个元素就是最小值,用priority qu
·
2015-11-13 07:47
dijkstra
SRM
589 DV1 250 回文字符串
(具体题目参看topcoder
srm
589 DV1 250分值的题目,不便公开以免影响后面做题的人) 首先对于(i,j),如果i=n-1-j, 那它们所代表的位置的字符最终必须相等,否则就
·
2015-11-13 07:34
字符串
【虚拟化实战】容灾设计之一VR vs
SRM
作者:范军 (Frank Fan) 新浪微博:@frankfan7 从本文开始,我们将介绍一系列的关于容灾的解决方案。先探讨应用的场景,然后再深入介绍技术架构。 情景一: 某小型公司的虚拟化环境中,在5台ESXi服务器上运行100台虚拟机。采用NFS存储。其中需要异地恢复的虚拟机10台。对于异地容灾RPO的要求是30分钟,RT
·
2015-11-13 07:26
虚拟化
TopCoder<
SRM
>上的一道1100分的题目解析附代码
首先我们来简单看一下这道题的statement Problem Statement Note that in the following problem statement, all quotes and angle brackets are for clarity A certain vending machi
·
2015-11-13 05:02
topcoder
SRM
223 Div II Level Two: BlackAndRed,O(N)复杂度
module=Static&d1=match_editorials&d2=
srm
223 这道题目最直接最暴力的算法就是遍历每个位置
·
2015-11-13 04:23
level
SRM
577 Div II Level Two: EllysRoomAssignmentsDiv2
题目来源: http://community.topcoder.com/tc?module=ProblemDetail&rd=15497&pm=12521 这个问题要注意的就是只需要直接将参数ratings中字符串连接起来就可以, 不用在每个元素后面加空格. 我开 始就以为每个元素连接的时候在后面要加空格分隔, 然后再把重复的元素去掉, 结果system tes
·
2015-11-13 03:52
level
复习:支持向量机的理论基础-学习算法的构造
上篇文章介绍了支持向量机的理论基础, 通过介绍我们知道要控制学习过程的推广能力,理论(1)和(2)告诉我们就得控制VC维,理论(3)中的
SRM
·
2015-11-13 02:00
算法
复习:支持向量机的理论基础—学习算法的实现方法
上节已经说明,我们使用
SRM
原则通过同时最小化经验风险和置信范围而最小化理论(2)中的界,也就是通过选择某个合适的结构然后在其中运行
·
2015-11-13 02:59
算法
SRM
544 DIV 2 250
坑点:0特判 View Code const double esp=1e-11; string ElectionFraudDiv2::IsFraudulent(vector <int> percentages) { vector <double> sb ; double sum=0; for (int i = 0 ;
·
2015-11-13 02:24
div
SRM
502 DIV2 RP爆发
3题AK , DIV2 rank 10,这算是我做TC以来发挥最正常的一次了…… 没有第一题fail,没有时间不够,没有编译不通…… 一下爆了100多分,嘎嘎 可以去DIV1混了! A是水题不过题目描述的有点含糊,关于几个人的问题,慢了一点没上240,第二题,其实简单的字符串看一下前缀就可以了,我SB的用trie处理的,不过贴模板了 速度上优势比较大……中途几次不明原因的RE……因为数组
·
2015-11-13 02:24
div
SRM
501 DIV2悲剧
的题,一上来看就是一个水题,但是写复杂了,208分收场 500分的题,开始以为是个简单DP,写出来发现原来可以有负数,再改分类讨论,就挂了一组数据当nB为0的时候的数据挂了…… 改后的代码
SRM
·
2015-11-13 02:22
div
SRM
176 Division-I, Level 2
Problem Statement A derangement of n numbers is a permutation of those numbers in which none of the numbers appears in its original place. For example, the numbers {1,2,3} can be
·
2015-11-13 01:46
visio
SRM
171 Division-I, Level 2
Problem Statement You are an electrical engineer putting together a prototype circuit in the lab. You need to add in one resistor to finish things up, but there is a problem: you
·
2015-11-13 01:45
visio
SRM
169 Division-I, Level 2
Problem Statement Fabian is in charge of a law firm working on an important case. For a case coming up, he needs a specific folder which is stored in one of the filing cabinets ar
·
2015-11-13 01:44
visio
SRM
161 Division-I, Level 2
Problem Statement You are practicing your tennis game with a hitting partner. Each time the ball comes over the net a player can either hit it cross-court, or down-the-line. In th
·
2015-11-13 01:44
visio
SRM
159 Division-I, Level 2
Problem Statement The Price Is Right is a television game show. In the final round of competition, the contestant is shown the prizes which he can win. To win everything, he must
·
2015-11-13 01:43
visio
SRM
158 Division-I, Level 2
Problem Statement Note to plugin users: there is an image in this problem statement. Please view the statement in the applet to see the image There is a collection of multi-color
·
2015-11-13 01:42
visio
SRM
156 Division-I, Level 2
Problem Statement You have been put in charge of writing the sofware that powers an elevator in a very tall office building. Because there is only one elevator in the building, an
·
2015-11-13 01:41
visio
SRM
148 Division-I, Level 2
Problem Statement 9 numbers need to be arranged in a magic number square. A magic number square is a square of numbers that is arranged such that every row and column has the same
·
2015-11-13 01:41
visio
SRM
150 Division-I, Level 2
Problem Statement Karel is a frustrated painter who works by day in an electrical repair shop. Inspired by the color-coded bands on resistors, he is painting a series of long, nar
·
2015-11-13 01:40
visio
SRM
146 Division-I, Level 2
Problem Statement Masterbrain is a two player board game in which one player decides on a secret combination of digits, while the other must figure it out in 10 guesses or less. T
·
2015-11-13 01:39
visio
SRM
149 Division-I, Level 2
Problem Statement It is a common practice in cryptography to remove the spaces from a message before encoding it to help to disguise its structure. Even after it is then decoded,
·
2015-11-13 01:39
visio
SRM
588 DIV1
250 题意:有n首不同的曲子,你唱每首曲子需要花费a的时间以及一个调整的时间b,调整的时间为此首歌的曲调减去上一首歌的曲调的绝对值。 思路:我们用dp[i][k]表示前i首歌只唱k首用的最小时间花费,最后拿所有的dp[i][k]和T做比较,满足条件则选取最大的k。这样的思路是没错的,但是...没注意到一种情况,dp[i][k]只要选了就保证序列定下来了,因为取的是绝对值,序列定下来的说明和时
·
2015-11-12 23:42
div
SRM
585
250 : 递推,从左下角到右下角走一条,剩下的都是子结构 const int mod = 1000000007; long long dp[1000010] , s[1000010]; class TrafficCongestion{ public : int theMinCars(int n) { long long ans
·
2015-11-12 23:53
rm
TC
SRM
593 DIV1 250(dfs)
这图最多3色就可以 搜2就行了 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<stdlib.h> 5 #include<vector> 6 #include<algorithm> 7
·
2015-11-12 18:23
div
SRM
556 DIV2
250. 找最长无重复子串。 500. 从val的范围入手(0~1023),bfs。 View Code 1 /* 2 Author:Zhaofa Fang 3 Lang:C++ 4 */ 5 #include <cstdio> 6 #include <cstdlib> 7 #include <iostream>
·
2015-11-12 16:33
div
SRM
553 DIV2
250. 解三元一次方程组。 View Code 1 class PlatypusDuckAndBeaver 2 { 3 public: 4 int minimumAnimals(int a, int b, int c) 5 { 6 int k = (2*b+4*c-a)/2; 7 int x = b
·
2015-11-12 16:32
div
SRM
555-DIV1
255point 题意:给你一段0、1组成的字符串,数出最少的5的倍数有多少。 做法:由题意范围,可知倍数的个数约有log(5, 2^50)(5为底) = 22个,因此预处理出所有满足5的倍数的字符串。 dp[i]表示从左到右第i个数为止最少有多少个5的倍数的二进制串,枚举i->j中的每个点每次符合条件的,转移方程为:dp[i] = min(dp[j] + 1, dp[i]);
·
2015-11-12 15:26
div
图论——2SAT
SRM
464 DIV1 500pt: 比较裸滴,二分+2SAT判定。
·
2015-11-12 15:58
图论
TC
SRM
514 DIV2
第一次用新号做
SRM
~首先,咳咳,很高兴能跟方方同学一起做
SRM
~ 这次总共做了3个,但只交上了两个,1000pt的那个想到算法了,代码也写完了,不过test时发现有两组数据出问题,于是debug。。
·
2015-11-12 15:55
div
SRM
581 D2 L2:SurveillanceSystem,重叠度
题目来源:http://community.topcoder.com/stat?c=problem_statement&pm=12588 在判断 ‘+’ 的时候使用了 重叠度 的概念,跟一般的 “先去掉这个位置,看剩下的位置能不能符合条件” 方法不太一样。 代码如下: #include <algorithm> #include <numeri
·
2015-11-12 13:56
System
SRM
581 D2 L3:TreeUnionDiv2,Floyd算法
题目来源:http://community.topcoder.com//stat?c=problem_statement&pm=12587&rd=15501 这道题目开始以为是要在无向图中判断环,而且要找出环的大小,后来看了解析之后才发现原来使用一个Floyd算法就搞定了,因为题目中加了很多限制,并不真的需要在一个任意的无向图中求 指定大小的环的数量。生成所有的排列组合可以
·
2015-11-12 13:52
UNION
RICEF简介
也可以应用到其他相关产品,例如CRM ,
SRM
, Portals 等。 摘要 FRICE是自
·
2015-11-12 13:17
ICE
linux 命令
通过文件名查找法: find / -name httpd.conf 根据部分文件名查找方法: find /etc -name '*
srm
*' 根据文件的特征查询方法: find
·
2015-11-12 13:44
linux 命令
SRM
585 DIV 1 总结
题意:给你一棵高度为H的完全二叉树的路,问最少需要多少辆车把这路走完,车子不能返回。 那么最优的方案就是从小到上一层层的走完,就很容易地可以得到一种递推,需要注意的就是dp[0] = 1 #include <vector> #include <list> #include <map> #include <s
·
2015-11-12 13:16
div
SRM
424 div1 900 翻译
为了解决这样的问题,我们需要关于一个整型数组 A[1..N]的数据结构,它支持这样的操作,起初,数组中的元素都是0,而且这样的数据结构支持下面两种操作: 1.更新 A[pos] = A[pos] + value (其中value,pos是任意给定的,且可能为负值) 2.计算 sum(A, l, r) = A[l]+A[l+1]+A[l+2]+...+A[r-1]
·
2015-11-12 11:12
div
SRM
423 div1 500p
Today I have practiced in the problem of
SRM
423 div 1 500pts.
·
2015-11-12 11:11
div
需求调研的心得
最近公司在做一个
SRM
的项目,引进的明基的供应商,目前也正是处于需求调研的阶段,自己也有幸能参与到其中。现在就把调研阶段中的一些心得和感受记录下来,希望能每天都有心得收获。
·
2015-11-12 10:51
需求
Topcoder
SRM
358:SharksDinner
有一些鲨鱼要进行晚餐,他们要互相吃对方。每个对于都有一个尺寸size,速度speed,和智力intelligence。鲨鱼A能够吃鲨鱼B当且进当A的size,speed,intelligence都大于或者等于B鲨鱼的。并且每个鲨鱼最多能够吃2个其它的鲨鱼。 现在给定int[] size, int[] speed and int[] intelligence,要求出最后存活的鲨鱼的最小数量。
·
2015-11-12 10:54
topcoder
Topcoder
SRM
358:BalanceScale
现在有n件物品集合V,每件有一个重量Wi,现在要从里面选出一个集合S,使得V-S中的物品都能由S中的物品称出来,即在一个天平的的左边放入V-S中的1件物品,那么必定可以从S中选出一些物品(可以无限使用)放在右边,使得天平平衡。 现在要求集合S中元素个数的最小值。 现在,我们先求出Wi(i=1,2,3...n)的最大公倍数g,然后把每个Wi都除以g,这样gcd(Wi)=1,这样并不会影响
·
2015-11-12 10:53
topcoder
Topcoder
SRM
358:SameDigits
定义一个函数f(n)表示中最长的一个序列,这个序列有相同的数字组成。 比如f(344488)=3,f(123)=1 现在给定两个整数n,k要求出有多少个数x,满足x的位数不大于n且f(x)=k.由于结果会很大,只用求出结果mod 44444444的值就可以了。 先考虑有多少个n位数x,满足f(x)=k. 我们从左往右来天数,需要记录的状态信息是: 1)有多少位数字要填 2)&nbs
·
2015-11-12 10:52
topcoder
二分法的妙用
Topcoder
SRM
338第2题,(http://www.topcoder.com/stat?c=prob
·
2015-11-12 10:39
二分法
Topcoder
SRM
619 DIv2 500 --又是耻辱的一题
这题明明是一个简单的类似约瑟夫环的问题,但是由于细节问题迟迟不能得到正确结果,结果比赛完几分钟才改对。。耻辱。 代码: #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #def
·
2015-11-12 10:49
topcoder
TC
SRM
573 DIV 2
终于在第4场TC,止住了rating一直下降的势头。。。 第一题水题,忘了。。。240+ 第二题贪心,没注意结果和n/3比较,差点挂了,看第3个题没有思路,检查一下第二个题发现我少考虑这种情况了。。。悲剧啊,第二个题,没怎么有分了。。 涨了30分。。 第三个题,强哥说是DP,我写了个暴力4维DP,用滚动数组防止MLE,中间一直越界,导致最后一组数据过不了。。虎哥提示精度。。我改改了。。终于
·
2015-11-12 09:23
div
SRM
567 div2(第一次啊)
本来想略过的,还是记录一下第一次玩TC,怎么着也算是处子秀啊。。。时间比CF短,发挥的很一般。开始看250,看了好一会才看懂题意,然后明白其水题本质,浪费了一些时间,得了190+。。然后就进入第二题,冥思了好久,同样,思考当中就感觉要挂,没有第一时间来想法的题目,就得想很久了。。。终于在思考了N久之后,觉得不能再想了,写写小数据,看看有没有规律。。。发现了可
·
2015-11-12 09:57
div
上一页
7
8
9
10
11
12
13
14
下一页
按字母分类:
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
其他