摘要:
P1-P17 废话 可跳过不过讲了如何搭建环境,如果你没有搭建的话,可以查看我的另外一个博文,详细讲了如何构建OpenCv的编程环境P19 开始编写第一个代码
阅读全文
posted @ 2014-10-16 22:51
qscqesze
阅读(173)
推荐(0)
摘要:
1. 安装OpenCV和VS。本人电脑安装的是opencv2.4.10和vs20122.配置环境变量以下以win8 64位系统为例:计算机-》属性-》高级系统设置-》环境变量然后在system variables中编辑Path:加入D:\Program Files\opencv\build\x86\...
阅读全文
posted @ 2014-10-16 22:30
qscqesze
阅读(628)
推荐(0)
摘要:
dp[i][j]=max(dp[i][j],dp[t][k-1]*mapn[t+1][i]);dp[i][j]代表从0-i之间有j个乘号,mapn[i][j]表示第i位到第j位的数究竟是多少 1 #include 2 #include 3 #include 4 #include 5 #inc...
阅读全文
posted @ 2014-10-08 13:47
qscqesze
阅读(211)
推荐(0)
摘要:
dp[i][j]=min(dp[i][j],dp[i][k],dp[k+1][j]+sum[i][j]);表示i-j的最小合并代价。 1 #include 2 #include 3 #include 4 5 using namespac...
阅读全文
posted @ 2014-10-08 13:14
qscqesze
阅读(187)
推荐(0)
摘要:
四维dp表示分别用了多少张卡后可以获得的最大分数 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #in...
阅读全文
posted @ 2014-10-08 12:46
qscqesze
阅读(174)
推荐(0)
摘要:
/*转移方程为dp[i][j]=dp[i-1][j]+dp[i][j-1]表示到(i,j)这个格子所需要的最多的步数注意几个特殊的地方马所在的地方,以及i=0;j=0的时候*/#include #include #include #include #include #include #include...
阅读全文
posted @ 2014-10-08 09:26
qscqesze
阅读(202)
推荐(0)
摘要:
简单的最长严格上升子序列的题dp[i]表示到a[i]这个数为最后的时候最大的长度是多少然后就差不多了吧~#include #include #include #include #include #include #include #include #include #include #include...
阅读全文
posted @ 2014-10-08 09:14
qscqesze
阅读(209)
推荐(0)
摘要:
1007 a + b 1 /*这题就是一个快速幂,但是十分猥琐的是,模是1e10 + 7,不是1e9 + 7,这就产生了一个爆long long的问题。所以要对快速幂中的乘法操作进行一下改造。请教了BIT_Is_a_Tree,学会了传说中的 「快速加」。原理和快速幂一模一样,a^{b}是b个a相乘,...
阅读全文
posted @ 2014-09-12 20:55
qscqesze
阅读(290)
推荐(0)
摘要:
1007 最近点对问题,采用分治法策略搞定 1 #include 2 #include 3 #include 4 using namespace std; 5 int n; 6 struct node 7 { 8 double x; 9 double y;10 }p[100005];11 i...
阅读全文
posted @ 2014-08-31 10:14
qscqesze
阅读(317)
推荐(0)
摘要:
section 1 不解释~section 21.2.1 a+b coming 1 #include 2 long long z,x,y; 3 int main( ) 4 { 5 while( scanf( "%I64x%I64x",&x,&y ) != EOF ) 6 { 7 ...
阅读全文
posted @ 2014-08-24 18:45
qscqesze
阅读(199)
推荐(0)
摘要:
B. Fedya and Mathstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFedya studies in a gymnasium. F...
阅读全文
posted @ 2014-08-09 10:25
qscqesze
阅读(473)
推荐(0)
摘要:
A. Laptopstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Dima and Alex had an argument a...
阅读全文
posted @ 2014-08-09 10:11
qscqesze
阅读(461)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 struct xxx 7 { 8 int p,d; 9 }a[22];10 int n,l;11 bool f[22];12 int main(...
阅读全文
posted @ 2014-08-08 10:11
qscqesze
阅读(179)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #in...
阅读全文
posted @ 2014-08-08 10:03
qscqesze
阅读(279)
推荐(0)
摘要:
Codeforces Round #253 (Div. 2)A. Anton and Letterstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outp...
阅读全文
posted @ 2014-08-07 10:42
qscqesze
阅读(465)
推荐(0)
摘要:
题目描述 Description下午,CYD要刷题了,已知CYD有N题可刷,但他只有M分钟的时间,而且他的智慧值为Q,也就是说他只能做出难度小于等于Q的题目。已知每题可得积分Ai,需花费时间Bi,难度为Ci,问CYD最多可得多少积分。输入描述 Input DescriptionN M QAi Bi ...
阅读全文
posted @ 2014-08-06 10:22
qscqesze
阅读(236)
推荐(0)
摘要:
题目描述 Description有一个箱子容量为V(正整数,0<=V<=20000),同时有n个物品(0<n<=30),每个物品有一个体积(正整数)。要求n个物品中,任取若干个装入箱内,使箱子的剩余空间为最小。输入描述 Input Description一个整数v,表示箱子容量一个整数n,表示有n个...
阅读全文
posted @ 2014-08-06 10:21
qscqesze
阅读(242)
推荐(0)
摘要:
很特别的一个动态规划入门教程今天在网上看到一个讲动态规划的文章,是以01背包为例的,这文章和书上的讲解非常不一样,令我眼前一亮,于是转载一下下~~~(说明一下,本人非常痛恨教材公式定理漫天飞,实际的讲解却讲得非常枯涩难懂,这种中国式的教育已经延绵了几千年了,现在中国的教材还是这个样子,讲清楚些明白些...
阅读全文
posted @ 2014-08-05 20:31
qscqesze
阅读(332)
推荐(0)
摘要:
题目描述Description 有 N 堆纸牌,编号分别为 1,2,…, N。每堆上有若干张,但纸牌总数必为 N 的倍数。可以在任一堆上取若于张纸牌,然后移动。 移牌规则为:在编号为 1 堆上取的纸牌,只能移到编号为 2 的堆上;在编号为 N 的堆上取的纸牌,只能移到编号为 N-1 的堆上;其他堆...
阅读全文
posted @ 2014-08-05 19:34
qscqesze
阅读(234)
推荐(0)
摘要:
No BrainerTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 25329Accepted: 16554DescriptionZombies love to eat brains. Yum.InputThe first line ...
阅读全文
posted @ 2014-07-31 10:40
qscqesze
阅读(309)
推荐(0)
摘要:
THE DRUNK JAILERTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 23358Accepted: 14720DescriptionA certain prison contains a long hall of n cel...
阅读全文
posted @ 2014-07-31 10:34
qscqesze
阅读(370)
推荐(0)
摘要:
408. Game with pointsTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardRecently Petya has discovered new ...
阅读全文
posted @ 2014-07-31 09:52
qscqesze
阅读(207)
推荐(0)
摘要:
406. GoggleTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardEverybody knows search engine Goggle. But on...
阅读全文
posted @ 2014-07-31 09:49
qscqesze
阅读(174)
推荐(0)
摘要:
405. TotalizatorTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardSome time ago Vasya was cleaning up the...
阅读全文
posted @ 2014-07-31 09:47
qscqesze
阅读(288)
推荐(0)
摘要:
404. Fortune-telling with camomileTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardMasha loves Petya. Th...
阅读全文
posted @ 2014-07-31 09:45
qscqesze
阅读(165)
推荐(0)
摘要:
403. Scientific ProblemTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardOnce upon a time Professor Idiot...
阅读全文
posted @ 2014-07-31 09:42
qscqesze
阅读(306)
推荐(0)
摘要:
The 3n + 1 problemTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 51221Accepted: 16262DescriptionProblems in Computer Science are often class...
阅读全文
posted @ 2014-07-30 10:18
qscqesze
阅读(197)
推荐(0)
摘要:
取石子游戏Description有 两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆 中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好...
阅读全文
posted @ 2014-07-30 10:08
qscqesze
阅读(339)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #inclu...
阅读全文
posted @ 2014-07-30 09:38
qscqesze
阅读(366)
推荐(0)
摘要:
DescriptionConsider a game in which darts are thrown at a board. The board is formed by 10 circles with radii 20, 40, 60, 80, 100, 120, 140, 160, 180,...
阅读全文
posted @ 2014-07-30 09:37
qscqesze
阅读(382)
推荐(0)
摘要:
PrototypeTime Limit: 1 Second Memory Limit: 32768 KBPrototype is a 3D game which allow you to control a person named Alex with much super ability t...
阅读全文
posted @ 2014-07-27 09:09
qscqesze
阅读(342)
推荐(0)
摘要:
N皇后问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1757Accepted Submission(s): 772 Problem Descr...
阅读全文
posted @ 2014-07-26 09:37
qscqesze
阅读(293)
推荐(0)
摘要:
Problem G. Birthday CakeBackgroundLucy and Lily are twins. Today is their birthday. Mother buys a birthday cake for them.Now we put the cake onto a De...
阅读全文
posted @ 2014-07-24 10:23
qscqesze
阅读(274)
推荐(0)
摘要:
Pseudo-Random NumbersComputers normally cannot generate really random numbers, but frequently are used to generate sequences of pseudo-random numbers....
阅读全文
posted @ 2014-07-24 09:47
qscqesze
阅读(312)
推荐(0)
摘要:
Problem J (2/3/4)-D Sqr/Rects/Cubes/Boxes?Input: standard inputOutput: standard outputTime Limit: 2 secondsYou can see a (4x4) grid below. Can you tel...
阅读全文
posted @ 2014-07-24 09:43
qscqesze
阅读(337)
推荐(0)
摘要:
假如出现SS 那么表示Spring,如果出现SX的话,就表示WINTER,末尾出现S不管 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include...
阅读全文
posted @ 2014-07-22 21:49
qscqesze
阅读(196)
推荐(0)
摘要:
Problem J Permutation CountingDexter considers a permutation of first N natural numbers good if it doesn't have x and x+1 appearing consecutively, whe...
阅读全文
posted @ 2014-07-22 21:40
qscqesze
阅读(344)
推荐(0)
摘要:
Let the Balloon RiseTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 50554Accepted Submission(s): 1...
阅读全文
posted @ 2014-07-21 10:25
qscqesze
阅读(407)
推荐(0)
摘要:
Kindergarten Counting GameEverybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how man...
阅读全文
posted @ 2014-07-21 09:43
qscqesze
阅读(255)
推荐(0)
摘要:
The DecoderWrite a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a si...
阅读全文
posted @ 2014-07-21 09:20
qscqesze
阅读(339)
推荐(0)