原题下载:http://icpc.baylor.edu/download/worldfinals/problems/icpc2013.pdf 题目翻译: 问题描述 俄罗斯套娃是一些从外到里大小递减的传统的俄罗斯木头玩偶组成的.当你打开一个俄罗斯套娃时,里面就会露出一个同样的俄罗斯套娃,再打开,就会再露出一个,不断重复. 俄罗斯的俄罗斯套娃博物馆最近收藏了一些外形相似的俄罗斯套娃集,只是里面嵌套的玩偶数量不相等.不幸的是,有一群过分热情的(和明显无人监督的)孩子们拆了他们,并放在一行上.有n个玩偶…
原题下载:http://icpc.baylor.edu/download/worldfinals/problems/icpc2013.pdf 题目翻译: 试题来源 ACM/ICPC World Finals 2013 C 问题描述 你现在要为智能汽车负责设计一种很高级的集中管理系统.目的是利用全球信息指导早上从郊区赶往市中心的乘客如何在避免交通堵塞的情况下更好地到达城市中心. 不幸的是,乘客们对城市非常了解,而且都相当自私,你不能简单地甩给他们一条比平常走的还要长的路径(否则他们会直接无视你的指…
原题下载 : http://icpc.baylor.edu/download/worldfinals/problems/icpc2013.pdf 这道题其实是2013年我AC的第一道题,非常的开心,这两天把2013年World Finals我能写的题都写的差不多了(我只写了A B C D F H I这七道题)开始着手来写解题报告,部分题目在UVaOJ上还存在超时,但是Tsinsen上面都AC了,题目的翻译转自清橙上国家集训队员们的翻译.每道题会提供题目翻译.题目大意.题目思路与解法.复杂度分析.…
原题下载:http://icpc.baylor.edu/download/worldfinals/problems/icpc2013.pdf 题目翻译: 问题描述 有n个机器,每个机器有2个芯片,每个芯片可以放k个电池. 每个芯片能量是k个电池的能量的最小值. 两个芯片的能量之差越小,这个机器就工作的越好. 现在有2nk个电池,已知它们的能量,我们要把它们放在n个机器上的芯片上, 使得所有机器的能量之差的最大值最小. 输入格式 第一行,两个正整数,n和k. 第二行,2nk个整数,表示每个电池的能…
原题下载:http://icpc.baylor.edu/download/worldfinals/problems/icpc2013.pdf 题目翻译: 问题描述 海盗Dick受够了在公海上厮杀.抢劫.盗窃了,这把生活弄得一塌糊涂.所以他决定隐退,而且他已经找到了一座理想的小岛,只要钱没花完就能在那儿安度余生.他现在有很多金币,他想要把这些金币存在一个宝箱里(毕竟他还是个海盗).Dick可以建造一个边长都是正整数的长方体宝箱,宝箱底面的长宽不能超过某个特定的尺寸,不过宝箱的高度可以是任意正整数.…
原题下载:http://icpc.baylor.edu/download/worldfinals/problems/icpc2013.pdf 题目翻译: 问题描述 一个最基本的算数法则就是大于1的整数都能用1个或多个素数相乘的形式表示出来.当然,可以安排出多种的质因子排列方案,例如:10=2*5=5*2 20=5*2*2=2*5*2=2*2*5 让我们用f(k)表示k的质因子排列方案数,如f(10)=2,f(20)=3. 给你一个正整数n,至少有一个k使得f(k)=n,我们想知道最小的k是多少.…
原题下载:http://icpc.baylor.edu/download/worldfinals/problems/icpc2013.pdf 这题真心的麻烦……程序不长但是推导过程比较复杂,不太好想 题目翻译: 问题描述 “在赌场里,基本原则就是让他们玩下去以及让他们再来玩.他们玩得越久,他们会输的越多,最后,我们会得到一切” (摘自1995年的电影Casino) 最近的经济衰退还没有影响到娱乐场所,包括赌场.赌场吸引广大玩家的竞争是很残酷的,有些赌场已经开始提供一些看上去很好的措施.有一个赌场…
Description Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the characters of the message. The second part contains a pattern that represents the message. You must write…
Programs executed concurrently on a uniprocessor system appear to be executed at the same time, but in reality the single CPU alternates between the programs, executing some number of instructions from each program before switching to the next. You a…
题目描述:算法竞赛入门经典习题3-5 题目思路:模拟题 #include <stdio.h> #include <string.h> #define maxn 55 char gird[maxn][maxn] ; char cmd[maxn] ; int blank_x,blank_y ; int main(int argc, char *argv[]) { ; ;i<;i++) gets(gird[i]) ; ;i<;i++) ;j<;j++) if(gird[…
任务介绍 你的任务是模拟n个程序的并行运算.(按照输入编号为1~n)的并行执行. 代码实现 #define LOCAL #include<bits/stdc++.h> using namespace std; int main(){ #ifdef LOCAL freopen("data.in","r",stdin); freopen("data.out","w",stdout); #endif // LOCAL i…
有一个r行c列(1≤r,c≤50)的电子表格,行从上到下编号为1-r,列从左到右编号为1 -c.如图4-2(a)所示,如果先删除第1.5行,然后删除第3, 6, 7, 9列,结果如图4-2(b) 所示. 接下来在第2.3.5行前各插入一个空行,然后在第3列前插入一个空列,会得到如图4- 3所示结果. 你的任务是模拟这样的n个操作.具体来说一共有5种操作: EX r1 c1 r2 c2交换单元格(r1,c1),(r2,c2). <command>A x1 x2 … xA 插入或删除A行或列(DC…
#include<stdio.h> #include<string.h> char s[5][5]; int main() { while(gets(s[0])) { int t = 0; if(s[0][0] == 'Z') break; int i ,j ,m ,n; for(i = 0;i < 5;i++) { if(i) gets(s[i]); for(j = 0;j < 5;j++) { if(s[i][j] == ' ') { m = i; n = j; b…
ACM International Collegiate Programming Contest World Finals 2013 A - Self-Assembly 题目描述:给出\(n\)个正方形组件,正方形每条边有一个标签,标签可能是00,表示这条边不能与其它边相拼,也可能是一个字母加正号或负号,相同字母不同符号的边可以相拼.每个组件有无限个,问利用这些组件是否能拼出一个无限大的多边形. solution 拆点,每个正方形拆成\(4\)个点,每条边一个,然后每条边拆成两个点(出点和入点)…
http://acm.hdu.edu.cn/showproblem.php?pid=4710 Balls Rearrangement Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 735    Accepted Submission(s): 305 Problem Description Bob has N balls and A b…
http://acm.hdu.edu.cn/showproblem.php?pid=4715 Difference Between Primes Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description All you know Goldbach conjecture.That is to say, Every even integer great…
http://acm.hdu.edu.cn/showproblem.php?pid=4712 Hamming Distance Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 1610    Accepted Submission(s): 630 Problem Description (From wikipedia) For bina…
http://acm.hdu.edu.cn/showproblem.php?pid=4706 Children's Day Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others) Problem Description Today is Children's Day. Some children ask you to output a big letter 'N'. 'N' is c…
ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków Problem A: Rubik’s RectangleProblem B: What does the fox say?Problem C: Magical GCDProblem D: SubwayProblem E: EscapeProblem F: DraughtsProblem G: History courseProblem H: C…
http://acm.hdu.edu.cn/showproblem.php?pid=4708 Rotation Lock Puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description Alice was felling into a cave. She found a strange door with a number square m…
hduoj 4706 Children's Day 2013 ACM/ICPC Asia Regional Online —— Warmup Herding Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2005    Accepted Submission(s): 563 Problem Description Little Joh…
http://acm.hdu.edu.cn/showproblem.php?pid=4707 Pet Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description One day, Lin Ji wake up in the morning and found that his pethamster escaped. He searched in th…
比赛链接: http://202.197.224.59/OnlineJudge2/index.php/Contest/problems/contest_id/36 题目来源: 2014嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛 ×  Problem A A simple problem   (求N % 1 + N % 2 + ....+ N % N, 待补) ?  Problem B Path √  Problem C Range   (单调栈) √  Problem…
Problem D. Delay Time Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 512 megabytes Petr and Egor are measuring the gravitational acceleration g on their physics lessons using a special device. An electromag…
hannnnah_j’s Biological Test Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 802    Accepted Submission(s): 269 Problem Description hannnnah_j is a teacher in WL High school who teaches biolog…
I Count Two Three Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 782    Accepted Submission(s): 406 Problem Description I will show you the most popular board game in the Shanghai Ingress Resis…
QSC and Master Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 859    Accepted Submission(s): 325 Problem Description Every school has some legends, Northeastern University is the same. Enter…
odd-even number Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 388    Accepted Submission(s): 212 Problem Description For a number,if the length of continuous odd digits is even and the length…
Different GCD Subarray Query Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 681    Accepted Submission(s): 240 Problem Description This is a simple problem. The teacher gives Bob a list of prob…
Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 439    Accepted Submission(s): 157 Problem Description A mysterious country will hold a football world championships---Abnormal Cup…