- 博客(87)
- 资源 (9)
- 收藏
- 关注
原创 AOJ-AHU-OJ-36 (POJ-2033) Alphacode
AlphacodeTime Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode the
2014-03-30 21:33:14 1520
原创 AOJ-AHU-OJ-87 (HDU-2289)Cup
CupTime Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescriptionThe WHU ACM Team has a big cup, with which every member drinks water. Now, we know the volume of the
2014-03-30 21:07:05 1104
原创 AOJ-AHU-OJ-675 定位赛
定位赛Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescriptionLOLS4.1赛季正式开始,排位分又重置了,上赛季是最强王者的DoubleLee,JCBOSS迫不及待地打开LOL纳尼?!!定位赛换成ACM题了?!定位赛题目如下:给你n个整数(依次编
2014-03-28 21:04:29 1384
原创 AOJ-AHU-OJ-670 Tyrion的矩阵
Tyrion的矩阵Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescriptionCersei有一个整数序列A = {A1, A2,..., An}, 0Jamie有一个整数序列B = {B1, B2,..., Bm}, 0Tyrion根据Ceise提供的序列A
2014-03-28 20:25:11 1136
原创 POJ-3122 Pie
PieTime Limit: 1000MS Memory Limit: 65536K Special JudgeDescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I ha
2014-03-28 19:44:21 992
原创 AOJ-AHU-OJ-668 the Kth number
the Kth numberTime Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescription定义序列N1 = {1, 2, 3, 4, 5, ..., 1000}(区间[1, 1000]内的所有整数);从N1中每隔1个数删除1个数进而得到N2 = {1, 3, 5,
2014-03-28 17:31:10 1321
原创 AOJ-AHU-OJ-662 越来越快
越来越快Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBTotal Submission: 597 Submission Accepted: 41DescriptionViky最近对数列有很大的兴趣,比如斐波那契数列。但研究斐波那契数列的人太多了,Viky决定用递推公式定
2014-03-28 17:07:43 1211
原创 AOJ-AHU-OJ-664 彩灯高高挂
彩灯高高挂Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescriptionBran收到了好友的一个礼物——彩灯。彩灯是一个n×n×n的正方体,由n×n×n个小正方体组成,每个小正方体都是一个小彩灯。我们用坐标(x,y,z)(0≤x,y,z<n)来表示各个小彩灯,那么有彩
2014-03-28 16:51:02 1303
原创 AOJ-AHU-OJ-661 跨越千山万水只为找到你
跨越千山万水只为找到你Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescription在一个二维平面上,有n条直线和不重叠的两个点(点S,点T,数据保证S和T一定不在n条直线中的任何一条上)。问:从点S到点T最少需要跨越多少条直线?注:题目有多组数据。I
2014-03-28 15:59:52 1189
原创 HDU-OJ-2752 WiFi
WiFiTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionOne day, the residents of Main Street got together and decided that they would ins
2014-03-27 09:51:21 1607 1
原创 AOJ-AHU-OJ-7 Redraiment猜想(优化)
回想起来当时请教出了“野筛法”800ms+飘过这道题的时候,内心愧疚不已。后来的后来,我问到了更强的方法,线性筛选。复杂度O(n),当然了,容斥原理是最快的,但是我死活理解不了啊……所谓线性筛选,就是我的条件很苛刻,对于每个合数,我只允许它被最小的素因子筛选。只筛一次,那就是线性啦!if(i % prime[j] == 0) break;枚举当前数,倘若它没有合数标记,送入素数表当中。之
2014-03-26 21:18:09 1569
原创 POJ-3232 Accelerator
AcceleratorTime Limit: 4000MS Memory Limit: 65536K DescriptionShiming (alpc02) is a boy likes to play PopKart very much. He is a good rider in this game. And on
2014-03-26 20:37:01 1363 1
原创 POJ-3104 Drying
DryingTime Limit: 2000MS Memory Limit: 65536K DescriptionIt is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She
2014-03-26 19:48:56 1014
原创 POJ-2456 Aggressive cows
Aggressive cowsTime Limit: 1000MS Memory Limit: 65536KDescriptionFarmer John has built a new long barn, with N (2 His C (2 <= C <= N) cows don't like this barn layout
2014-03-26 19:24:32 1567
原创 【DP|01背包】HDU-2602 Bone Collector
Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “B
2014-03-26 15:31:10 1063
转载 Ubuntu Code::Blocks 汉化
1.下载rar汉化包(之后下载unrar以备解压) sudo apt-get install unrar2.解压文件(方法见上篇文章),得到一个文件夹:zh_CN,里面有汉化包文件。 unrar x file.rar3.打开终端:在codeblocks的安装文件夹中新建一个文件夹:locale
2014-03-23 11:20:37 1023
转载 openSUSE搜狗拼音输入法
killall ibus-daemon sudo apt-get purge ibus ibus-gtk ibus-gtk3 ibus-pinyin* ibus-sunpinyin ibus-table python-ibus rm -rf ~/.config/ibussudo add-apt-repository ppa:fcitx-team/nightly
2014-03-23 11:04:31 1983
原创 【DP|01背包】AOJ-524 桂园食堂
桂园食堂Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBTotal Submission: 702 Submission Accepted: 110Description食堂对大家来说一点都不陌生,每次打菜的时候我们几乎看重两样:价钱和味道.现在你来到了桂园二楼打菜,假设
2014-03-23 09:13:31 1905
原创 AOJ-AHU-OJ-595 撒哈拉大冒险(栈)
撒哈拉大冒险Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBTotal Submission: 193 Submission Accepted: 14Description在撒哈拉大沙漠中,有一个神奇的迷宫,那是所有冒险,探索者都想要破解的圣地。迷宫是由多块相同的子迷
2014-03-22 13:43:17 1465
原创 HDU-OJ-1233 还是畅通工程
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连
2014-03-21 21:10:34 1314
原创 HDU-OJ-1010 Tempter of the Bone
Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a
2014-03-20 08:22:02 1015
原创 USACO-cha1-sec1.3(AOJ-133) Calf Flac
Calf FlacTime Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBJudge By CaseDescriptionIt is said that if you give an infinite number of cows an infinite number ofheavy-dut
2014-03-19 16:55:39 1062
原创 并查集模板[路径压缩]
1 int father[MAX]; 2 int rank[MAX]; 3 4 5 6 void Make_Set(int x)7 {8 father[x] = x; //根据实际情况指定的父节点可变化9 rank[x] = 0; //根据实际情况初始化秩也有所变化10 }11 12 13 14 int Find_Set(int
2014-03-19 14:52:46 1236
原创 AOJ-AHU-OJ-489 夺宝奇兵
夺宝奇兵Time Limit: 8000 ms Case Time Limit: 8000 ms Memory Limit: 64 MBDescriptionHF市地下有一份宝藏,数不清的黄金、钻石……。令人遗憾的是,千年来未曾有人得到过这份宝藏。其中一个主要原因就是,要得到这份宝藏之前,首先需要通过一个迷宫。这个迷宫的结构非常复杂,一共有N个秘密房间。广为流传的一种说
2014-03-19 13:26:30 2083
原创 AOJ-AHU-OJ-528 连通图
连通图Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBJudge By CaseDescription在无向图G中,如果任两结点可达,则称图G是联通的; 如果G的子图G’是联通的,没有包含G’的更大子图G’’是联通的,则称G’是G的联通分图。一个无向图,要么是一个联通图,要么是由若干个联通分
2014-03-19 12:55:41 1314
转载 搜索的优化算法——剪枝
原文地址http://princetonboy.ycool.com/post.2805302.html【摘要】本文讨论了搜索算法中“剪枝”这一常见的优化技巧.首先由回溯法解决迷宫问题展开论述,介绍了什么是剪枝;而后分析剪枝的三个原则正确、准确、高效,并分别就剪枝的两种思路:可行性剪枝及最优性剪枝,结合例题作进一步的阐述;最后对剪枝优化方法进行了一些总结.在竞赛中,我们有时会碰到一些
2014-03-18 21:21:14 2750
原创 Codeforces-260a F Adding Digits
A. Adding Digitstime limit per test2 secondsmemory limit per test256 megabytesVasya has got two number: a and b. However, Vasya finds number a too short. So he decided to repeat th
2014-03-18 20:37:08 1510
原创 ZOJ-1004(AOJ-466) Anagrams by Stack
Anagrams by StackTime Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescriptionHow can anagrams result from sequences of stack operations? There are two sequences of stack o
2014-03-18 20:10:04 1211
原创 AOJ-AHU-OJ-466 Monthly Expense
Monthly ExpenseTime Limit: 2000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBJudge By CaseDescriptionFarmer John is an astounding accounting wizard and has realized he might run out of
2014-03-18 19:44:30 1201
原创 AOJ-AHU-OJ-294 NBA Finals
NBA FinalsTime Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescriptionConsider two teams, Lakers and Celtics, playing a series of NBA Finals until one of the teams wins n
2014-03-18 19:17:28 1984
原创 AOJ-AHU-OJ-64 数字三角形
数字三角形问题Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescription73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program
2014-03-18 17:51:46 1402
原创 AOJ-AHU-OJ-443 寄存器数据转换
寄存器数据转换Time Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescription假设你工作在一个32位的机器上,你需要将某一个外设寄存器的第X位设置成0(最低位为第0位,最高位为第31位),将第Y位开始的连续三位设置成110(从高位到低位的顺序),而其他位保持不变。对给定的寄存器值R,及
2014-03-18 17:37:37 1075
原创 AOJ-AHU-OJ-596 下一个K-number
下一个K-numberTime Limit: 1000 ms Case Time Limit: 1000 ms Memory Limit: 64 MBDescription我们首先定义一种k-number。对于某一个数,在二进制表示中,如果有k位为1,则这个数称为k-number。如:14=(1110)2 ,则14被称为3-number。现如今给一个正整数n
2014-03-18 17:27:51 1160
原创 HDU-OJ-2020 L 绝对值排序
绝对值排序 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description输入n(n Input输入数据有多组,每组占一行,每行的第一个数字为n,接着是n个整数,n=0表示输入数据的结束,不做处理。
2014-03-18 15:00:36 1049
原创 HDU-OJ-2019 K 数列有序!
数列有序!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description有n(n Input输入数据包含多个测试实例,每组数据由两行组成,第一行是n和m,第二行是已经有序的n个数的数列。n和m同时为0标示输入数据的结束
2014-03-18 14:51:11 1338
原创 Codeforces-289b J Polo the Penguin and Matrix
B. Polo the Penguin and Matrixtime limit per test2 secondsmemory limit per test256 megabytesLittle penguin Polo has an n × m matrix, consisting of integers. Let's index the matrix ro
2014-03-18 14:39:45 3477
原创 Codeforces-289a I Polo the Penguin and Segments
A. Polo the Penguin and Segments time limit per test2 secondsmemory limit per test256 megabytesLittle penguin Polo adores integer segments, that is, pairs of integers [l; r] (l ≤
2014-03-18 14:29:25 3293
原创 Codeforces-298b H Sail
B. Sailtime limit per test1 secondmemory limit per test256 megabytesThe polar bears are going fishing. They plan to sail from (sx, sy) to(ex, ey). However, the boat can only sail
2014-03-18 14:11:40 2686
原创 Codeforces-298a G Snow Footprints
A. Snow Footprintstime limit per test1 secondmemory limit per test256 megabytesThere is a straight snowy road, divided into n blocks. The blocks are numbered from 1 ton from left t
2014-03-18 13:51:53 1552
原创 Codeforces-279a F Point on Spiral
A. Point on Spiraltime limit per test2 secondsmemory limit per test256 megabytesValera the horse lives on a plane. The Cartesian coordinate system is defined on this plane. Also an i
2014-03-18 13:33:58 1553
Code::Blocks13.12 汉化+多方案主题(代码高亮)+智能缩进
2014-04-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人