自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(158)
  • 收藏
  • 关注

转载 程序员技术练级攻略

月光博客6月12日发表了《写给新手程序员的一封信》,翻译自《An open letter to those who want to start programming》,我的朋友(他在本站的id是Mailper)告诉我,他希望在酷壳上看到一篇更具操作性的文章。因为他也是喜欢编程和技术的家伙,于是,我让他把他的一些学习Python和Web编程的一些点滴总结一下。于是他给我发来了一些他的心得和经历

2013-08-19 11:48:38 2202 1

原创 ZOJ 3202 Second-price Auction (模拟)

Second-price Auctionhttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3202Time Limit: 1 Second      Memory Limit: 32768 KBDo you know second-price auction? It's very simple bu

2013-08-31 21:37:45 1202

原创 Codeforces Round #147 (Div. 2) / 237A Free Cash (模拟)

A. Free Cashhttp://codeforces.com/problemset/problem/237/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-31 21:22:42 1402

原创 UVa 1513 / UVALive 5902 Movie collection (树状数组)

5902 - Movie collectionTime limit: 3.000 secondshttps://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=3913Mr. K. I. has a very big

2013-08-31 21:01:44 2065

原创 Codeforces Round #198 (Div. 2) / 340A The Wall (数论)

A. The Wallhttp://codeforces.com/contest/340/problem/Atime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputI

2013-08-31 20:02:44 1024

原创 URAL 1915 Titan Ruins: Reconstruction of Bygones (栈)

1915. Titan Ruins: Reconstruction of BygonesTime limit: 1.0 secondMemory limit: 64 MB`It seems that we're in a trap,' said Soren.`A very familiar phrase,' Alba replied.The friend

2013-08-31 14:09:18 977

原创 Codeforces Round #152 (Div. 2) / 248B Chilly Willy (数论)

B. Chilly Willyhttp://codeforces.com/problemset/problem/248/Btime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-30 09:19:50 1512

原创 Codeforces Round #119 (Div. 2) / 189A Cut Ribbon (完全背包)

A. Cut Ribbonhttp://codeforces.com/problemset/problem/189/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-29 21:19:33 2532

原创 POJ 2271 HTML (字符串处理)

HTMLhttp://poj.org/problem?id=2271Time Limit: 1000MSMemory Limit: 65536KDescriptionIf you ever tried to read a html document on a Macintosh, you know how hard it is if no N

2013-08-29 19:29:50 1032

原创 POJ 2260 Error Correction (模拟)

Error Correctionhttp://poj.org/problem?id=2260Time Limit: 1000MSMemory Limit: 65536KDescriptionA boolean matrix has the parity property when each row and each column has an

2013-08-29 18:57:30 1483

原创 POJ 1028 / East Central North America 2001 Web Navigation (栈)

Web Navigationhttp://poj.org/problem?id=1028Time Limit: 1000MSMemory Limit: 10000KDescriptionStandard web browsers contain features to move backward and forward among the p

2013-08-29 16:37:28 1568

原创 POJ 2479 Maximum sum (DP&双最大子段和)

Maximum sumhttp://poj.org/problem?id=2479Time Limit: 1000MSMemory Limit: 65536KDescriptionGiven a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below:

2013-08-29 15:42:37 1075

原创 Codeforces Round #186 (Div. 2) / 313B Ilya and Queries (字符串处理)

B. Ilya and Queriestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIlya the Lion wants to help all his fri

2013-08-29 10:01:41 1679

原创 Codeforces VK Cup 2012 Qualification Round 1 /158C (字符串处理)

C. Cd and pwd commandshttp://codeforces.com/problemset/problem/158/Ctime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard

2013-08-28 23:36:53 943

原创 POJ 1068 Parencodings (字符串处理)

Parencodingshttp://poj.org/problem?id=1068Time Limit: 1000MSMemory Limit: 10000KDescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in t

2013-08-28 21:32:11 828

原创 Codeforces Bayan 2012-2013 Elimination Round / 241A Old Peykan (贪心)

A. Old Peykanhttp://codeforces.com/contest/241/problem/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-28 16:15:16 1104

原创 SGU 127 Telephone directory (模拟)

time limit per test: 0.5 sec. memory limit per test: 4096 KBhttp://acm.sgu.ru/problem.php?contest=0&problem=127CIA has decided to create a special telephone directory for its agents. The fir

2013-08-28 14:50:56 1021

原创 SGU 115 Calendar (模拟)

time limit per test: 0.5 sec. memory limit per test: 4096 KBhttp://acm.sgu.ru/problem.php?contest=0&problem=115First year of new millenium is gone away. In commemoration of it write a progra

2013-08-27 19:25:26 913

原创 SGU 107 987654321 problem (数论)

time limit per test: 0.5 sec. memory limit per test: 4096 KBFor given number N you must output amount of N-digit numbers, such, that last digits of their square is equal to 987654321.Input

2013-08-27 19:08:02 1789

原创 HDU 1061 Rightmost Digit (数学&三种解法)

Rightmost Digithttp://acm.hdu.edu.cn/showproblem.php?pid=1061Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionGiven

2013-08-27 16:20:25 890

转载 C语言中内存堆和栈的区别

在计算机领域,堆栈是一个不容忽视的概念,我们编写的C语言程序基本上都要用到。但对于很多的初学着来说,堆栈是一个很模糊的概念。堆栈:一种数据结构、一个在程序运行时用于存放的地方,这可能是很多初学者的认识,因为我曾经就是这么想的和汇编语言中的堆栈一词混为一谈。我身边的一些编程的朋友以及在网上看帖遇到的朋友中有好多也说不清堆栈,所以我想有必要给大家分享一下我对堆栈的看法,有说的不对的地方请朋友们不吝

2013-08-27 02:35:14 1819

原创 Codeforces Round #121 (Div. 1) / 191A Dynasty Puzzles (dp&优化)

A. Dynasty Puzzleshttp://codeforces.com/problemset/problem/191/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outp

2013-08-27 01:39:59 969

原创 Codeforces Round #193 (Div. 2) / 332A Down the Hatch! (模拟)

A. Down the Hatch!http://codeforces.com/contest/332/problem/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-26 09:46:37 890

原创 Codeforces Round #147 (Div. 2) / 237B Young Table (搜索)

B. Young Tablehttp://codeforces.com/problemset/problem/237%2FBtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-26 09:16:03 1013

原创 POJ 3233 Matrix Power Series (矩阵&快速等比数列求和取模)

Matrix Power Serieshttp://poj.org/problem?id=3233Time Limit: 3000MSMemory Limit: 131072KDescriptionGiven a n × n matrix A and a positive integer k, find the sum S = A +

2013-08-25 20:30:19 1117

原创 HDU 1022 Train Problem I (栈)

Train Problem Ihttp://acm.hdu.edu.cn/showproblem.php?pid=1022Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionAs the

2013-08-25 17:07:57 1031

原创 Codeforces Beta Round #74 (Div. 2) / 90B African Crossword (模拟)

B. African Crosswordhttp://codeforces.com/problemset/problem/90%2FBtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard o

2013-08-25 16:37:02 2233

原创 Codeforces Round #131 (Div. 2) / 214A System of Equations(枚举&优化)

A. System of Equationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFurik loves math lessons very much,

2013-08-25 14:20:28 1324

原创 POJ 3126 / Northwestern Europe 2006 Prime Path (数论&BFS)

Prime Pathhttp://poj.org/problem?id=3126Time Limit: 1000MSMemory Limit: 65536KDescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Secu

2013-08-25 13:56:44 1111

原创 POJ 1033 / Northeastern Europe 1998 Defragment (模拟&队列)

Defragmenthttp://poj.org/problem?id=1033Time Limit: 2000MSMemory Limit: 10000KCase Time Limit: 1000MSSpecial JudgeDescriptionYou are taking part in the development

2013-08-25 13:09:49 1302 2

原创 POJ 1365 / Central Europe 1997 Prime Land (数论)

Prime Landhttp://poj.org/problem?id=1365Time Limit: 1000MSMemory Limit: 10000KDescriptionEverybody in the Prime Land is using a prime base number system. In this system, ea

2013-08-25 09:34:22 1011

原创 类型转换与字符串赋值、分割、合并、复制、比较、查询、翻转详解 (完整代码)

一、类型转换char数组转int、__int64或double:#include#include#include#includechar str[100];int main(void){ char *stopstr; gets(str); if (strchr(str, '.') == NULL) { if (strlen(str) < 10) print

2013-08-24 20:44:46 2867 1

原创 一、初级篇——指针(*)、取地址(&)、解引用(*)与引用(&)的区别

一、初步了解——指针与取地址先看程序:#include<cstdio>int main(void){ int num = 7; int *p = &num; printf("%d 的地址是 %p\n", num, p); return 0;}二、如何使用指针?——解引用与指针赋值

2013-08-24 14:00:22 67679 8

原创 Codeforces Round #105 (Div. 2) / 148A Insomnia cure (枚举 || 数论)

A. Insomnia curehttp://codeforces.com/problemset/problem/148/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-24 09:53:59 2335

原创 Codeforces Beta Round #91 (Div. 2) / 122A Lucky Division (数论)

A. Lucky Divisionhttp://codeforces.com/problemset/problem/122/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outpu

2013-08-23 17:39:40 1011

原创 Codeforces Round #163 (Div. 2) / 226A Stones on the Table (字符串处理)

A. Stones on the Tablehttp://codeforces.com/problemset/problem/266/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard

2013-08-23 15:38:20 1105

原创 POJ 2245 Lotto (枚举)

Lottohttp://poj.org/problem?id=2245Time Limit: 1000MSMemory Limit: 65536KDescriptionIn the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular

2013-08-23 13:08:41 1014

原创 Codeforces Round #173 (Div. 2) / 282C XOR and OR (字符串处理)

C. XOR and ORhttp://codeforces.com/problemset/problem/282/Ctime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

2013-08-22 23:40:51 1471

原创 Codeforces Beta Round #92 (Div. 2) / 124A The number of positions (简单数学)

A. The number of positionshttp://codeforces.com/problemset/problem/124/Atime limit per test0.5 secondmemory limit per test256 megabytesinputstandard inputoutputstan

2013-08-22 22:22:59 1318

原创 快速幂取模讲解&模板

对于给定的a,b,如何在O(log b)时间内求出a^b mod M?首先我们来看看3^14 mod M,我们可以将其转化为3^2 * 3^4 * 3^8 mod M,然后写一个while循环,先计算3^2 mod M ,随后用该值计算3^4 mod M,……那么,3^2 * 3^4 * 3^8是怎么得到的呢?我们可以用二进制作一个中间转换:1. 将14化为2进制,得111

2013-08-22 21:50:55 964

空空如也

空空如也

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

TA关注的人

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