自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Ieyasu的专栏

读万卷书,行千里路。

  • 博客(62)
  • 收藏
  • 关注

原创 C++ 可调用对象的总结

C++总共有5种可调用对象: 普通函数, 函数指针, lambada, 函数对象(仿函数), bind创建的对象(主要将多元谓词降次)具体代码如下:#include #include #include #include using namespace std;using namespace std::placeholders;//can't use std onlyconst

2014-12-21 19:52:11 570

原创 Codeforces 6C. Alice, Bob and Chocolate

C. Alice, Bob and Chocolatetime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputAlice and Bob like games. And no

2014-12-07 15:35:44 648

原创 Codeforces 6B. President's Office

B. President's Officetime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputPresident of Berland has a very vast o

2014-12-07 15:33:42 669

原创 Codeforces 6A. Triangle

A. Triangletime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputJohnny has a younger sister Anne, who is very cl

2014-12-07 15:30:42 466

原创 Codeforces 5E. Bindian Signalizing

E. Bindian Signalizingtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEveryone knows that long ago on the

2014-12-07 15:28:52 969

原创 Codeforces 5D. Follow Traffic Rules

D. Follow Traffic Rulestime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputEverybody knows that the capital of B

2014-12-07 15:24:22 780

原创 Codeforces 5C. Longest Regular Bracket Sequence

C. Longest Regular Bracket Sequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is yet another pro

2014-12-07 15:22:07 702

原创 Codeforces 5B. Center Alignment

B. Center Alignmenttime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputAlmost every text editor has a built-in f

2014-12-07 15:15:23 745

原创 Codeforces 5A. Chat Server's Outgoing Traffic

A. Chat Server's Outgoing Traffictime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputPolycarp is working on a ne

2014-12-07 15:12:59 714

原创 Codeforces 4D. Mysterious Present

D. Mysterious Presenttime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputPeter decided to wish happy birthday t

2014-12-07 15:09:41 718

原创 Codeforces 4C. Registration system

C. Registration systemtime limit per test5 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputA new e-mail service "Berlandesk" is

2014-12-07 14:58:49 619

原创 Codeforces 4B. Before an Exam

B. Before an Examtime limit per test0.5 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputTomorrow Peter has a Biology exam. He doe

2014-12-07 14:57:11 562

原创 Codeforces 4A. Watermelon

A. Watermelontime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputOne hot summer day Pete and his friend Billy de

2014-12-07 14:55:44 362

原创 Codeforces 3D. Least Cost Bracket Sequence

D. Least Cost Bracket Sequencetime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputThis is yet another problem on

2014-12-07 14:53:19 499

原创 Codeforces 3C. Tic-tac-toe

C. Tic-tac-toetime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputCertainly, everyone is familiar with tic-tac-t

2014-12-07 14:14:28 777

原创 Codeforces 3B. Lorry

B. Lorrytime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputA group of tourists is going to kayak and catamaran

2014-12-07 14:10:45 748

原创 Codefoeces 3A. Shortest path of the king

A. Shortest path of the kingtime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputThe king is left alone on the ch

2014-12-07 13:50:53 569

原创 Codefoeces 2B. The least round way

B. The least round waytime limit per test5 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThere is a square matrix n × n, consi

2014-12-07 13:45:01 449

原创 Codeforces 2A. Winner

A. Winnertime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputThe winner of the card game popular in Berland "Ber

2014-12-07 13:27:14 439

原创 Codeforces 1B. Spreadsheets

B. Spreadsheetstime limit per test10 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputIn the popular spreadsheets systems (for ex

2014-12-07 13:24:17 521

原创 Codeforces 1A. Theatre Square

A. Theatre Squaretime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputTheatre Square in the capital city of Berl

2014-12-07 13:20:14 390

原创 拓扑排序+有向无环图(DAG)的检测

/***************************拓扑排序的两张方法:1.dfs搜索2.模拟人工的拓扑两种方法的效率都是O(V + E)$$拓扑排序的方法也是有向无环图检测的方法****************************//*拓扑排序 dfs搜索 - 邻接表可以判断一个图是否有环*/#include #include #include usin

2014-10-31 22:15:39 2496

原创 深度优先搜索DFS( 递归+非递归)

参考算法导论第三版 p349

2014-10-31 20:30:34 950

原创 HDU-1003 Max Sum-动态规划-难度2

Max SumTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 129864    Accepted Submission(s): 30100Problem DescriptionGiven a seq

2014-03-20 10:16:51 659

原创 LeetCode Palindrome Number

Palindrome Number Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you a

2014-03-11 19:53:23 329

原创 LeetCode Reverse Integer

Reverse Integer Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321注意点需要考虑 反转会溢出的问题;代码int reverse(int x){ int flag, sum = 0; while(x) {

2014-03-11 19:17:48 362

原创 LeetCode Add Two Numbers

Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and r

2014-03-11 16:25:00 434

原创 LeetCode Two Sum Total

Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, w

2014-03-09 20:31:25 469

原创 LeetCode Reverse Words in a String Total

Reverse Words in a String Total Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Clarification:What constitut

2014-03-09 19:28:29 573

原创 算法竞赛入门经典-课后练习-2-10-排列

#include #include #include #include #include using namespace std;ifstream fin("f:\\input.txt");ofstream fout("f:\\output.txt");int main(){ //freopen("f:\\input.txt", "r", stdin); //freope

2013-12-27 16:09:09 597

原创 算法竞赛入门经典-书本例子-3-3-竖式计算

#include #include #include #include #include #include using namespace std;int main(){ int count = 0; char s[20]; cin >> s; for(int abc = 100; abc != 1000; ++abc) { for(int de = 10; d

2013-12-27 16:06:14 517

原创 算法竞赛入门经典-课后练习-3-1-2分数统计

#include #include #include #include #include #include #include #include using namespace std;struct Score{ int size; double points;};vector student;vector ans;int main(){ freopen(

2013-12-27 16:00:39 642

原创 UVa10010 - Where's Waldorf?-字符串(8方向搜索)-难度3

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=951  Where's Waldorf? Given a m by n grid of letters, ( ), and a l

2013-12-27 15:51:03 560

原创 UVa409 - Excuses, Excuses!-字符串-难度2

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=350代码+思路#include #include #include #include #include #include #include #include us

2013-12-25 18:04:09 452

原创 UVa537 - Artificial Intelligence?-字符串(混合字符实数输入)-难度3

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=350代码+思路/* * 1.用字符输入,当碰到实数的时候换实数输入,省去了把字符转换为实数的步骤 * 2.每次遇见'\n'或者文件输入结束

2013-12-25 17:19:56 500

原创 UVa401 - Palindromes-字符串(镜像字符串)-难度2

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342  Palindromes A regular palindrome is a string of numbers or lett

2013-12-25 14:56:40 720

原创 UVa10815 - Andy's First Dictionary- 字符串(map的使用)-难度2

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1756Problem B: Andy's First DictionaryTime limit: 3 seconds

2013-12-24 18:45:50 589

原创 UVa10115 - Automatic Editing- 字符串(子串替换)-难度2

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=1056Problem E: Automatic EditingSource file:autoedit.{c, cpp, java,

2013-12-24 16:30:29 718

原创 UVa10361-Automatic Poetry-字符串-难度1

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1302Problem IAutomatic PoetryInput: standard inputOutput: standard outputTime Limit:

2013-12-24 11:53:32 595

原创 OpenCV学习-第二章-视频播放控制-支持滚动条随着视频播放自动移动

支持滚动条随着视频播放自动移动/*第三个OpenCV程序*/#include "opencv/cv.h"#include "opencv/highgui.h"int g_slider_position = 0;CvCapture *g_capture = NULL;void onTrackbarSlide(int pos){ /* * Function:Sets a pro

2013-12-23 15:29:16 869

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除