ACM
文章平均质量分 56
风卷云飞会天黑
这个作者很懒,什么都没留下…
展开
-
2013ACM多校联合--【数学】
[提交][状态][讨论版]题目描述给出数列A1;A2; : : : ;AN,并设现要求把所有的Bi 算出来。输入输入包含多组测试数据。对于每组数据,第1 行,1 个整数N(1 行,N 个整数A1,A2, ......,AN(1 输出对于每组数据,输出一行,N 个整数用空格分隔,表示算出的B1,B2, ....原创 2014-05-01 15:29:52 · 548 阅读 · 0 评论 -
【第五届河南省程序设计大赛】Metric Matrice
描述Given as input a square distance matrix, where a[i][j] is the distance between point i and point j, determine if the distance matrix is "a metric" or not.A distance matrix a[i][j] is a metric i原创 2015-04-06 14:00:22 · 707 阅读 · 0 评论 -
FZU 1113 Game Prediction
DescriptionSuppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a positive integer which is at most N*M. And原创 2015-04-19 13:12:50 · 877 阅读 · 0 评论 -
FZU 2111【 Min Number】
DescriptionNow you are given one non-negative integer n in 10-base notation, it will only contain digits ('0'-'9'). You are allowed to choose 2 integers i and j, such that: i!=j, 1≤i<j≤|n|, here |原创 2015-04-22 21:09:32 · 563 阅读 · 0 评论 -
河南省第七届ACM【Turing equation】
【Description】The fight goes on,whether to store numbers starting withtheir most significant digit or their least significant digit. Sometimes this isalso called the "Endian War". The battlegro原创 2015-04-21 11:06:38 · 593 阅读 · 0 评论 -
携程编程大赛 (预赛第二场)第三题【位图像素的颜色】
Problem Description有一个在位图上画出矩形程序,一开始位图都被初始化为白色(RGB颜色表示为R=G=B=255)。该程序能够按照顺序绘出N个矩形。新绘制的矩形能够覆盖位图上原有的颜色。程序执行完毕后,需要查询M个点的颜色,输出这些点的RGB值。每组数据都是在初始化后开始绘制。 Input第一行包含参数N和M,分别表示矩形个数和需要原创 2014-04-12 10:07:05 · 919 阅读 · 0 评论 -
CodeForces 520B【Two Buttons】
DescriptionVasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive integer. After clicking the red button, devic原创 2015-04-27 08:00:45 · 2253 阅读 · 0 评论 -
湖南2014CPC 题目 C. 酷酷的单词
输入一些仅由小写字母组成的单词。你的任务是统计有多少个单词是“酷”的,即每种字母出现的次数都不同。比如 ada 是酷的,因为 a 出现 2 次, d 出现 1 次,而 1 和 2 不同。再比如, banana 也是酷的,因为 a 出现 3 次, n 出现 2 次, b 出现 1 次。但是, bbacccd 不是酷的,因为 a 和 d 出现的次数相同(均为 1 次)。输入格式输入包含不超过原创 2015-04-30 20:01:38 · 1325 阅读 · 0 评论 -
湖南2014CPC 超大型LED显示屏
DescriptionInput输入包含不超过100组数据。每组数据第一行为"START hh:mm:ss",表示比赛开始时刻为hh:mm:ss。最后一行为"END hh:mm:ss",即比赛结束时刻。二者之间至少会有一个SCORE信息,格式为"SCORE hh:mm:ss team score",其中team要么是"home"(主场)要么是"guest原创 2015-04-30 20:04:27 · 1404 阅读 · 0 评论 -
ZOJ 3600【Taxi Fare】模拟
DescriptionLast September, Hangzhou raised the taxi fares.The original flag-down fare in Hangzhou was 10 yuan, plusing 2 yuan per kilometer after the first 3km and 3 yuan per kilometer after 10k原创 2015-05-03 09:05:22 · 1052 阅读 · 0 评论 -
Problem J:Contest Print Server
Time Limit : 2000/1000ms(Java/Other) Memory Limit : 65535/32768K (Java/Other) Problem DescriptionIn ACM/ICPC on-sitecontests ,3 students share 1 computer,so you can print your source code anyt原创 2015-04-28 19:07:40 · 610 阅读 · 0 评论 -
POJ 2509【Peter's smokes】
DescriptionPeter has n cigarettes. He smokes them one by one keeping all the butts. Out of k > 1 butts he can roll a new cigarette. How many cigarettes can Peter have? InputI原创 2015-05-06 21:03:25 · 969 阅读 · 0 评论 -
POJ 2393【Yogurt factory】
DescriptionThe cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and labor will fluctuate weekly such that it原创 2015-05-06 21:05:02 · 574 阅读 · 0 评论 -
【第七届河南省赛】 H.Rectangles
DescriptionGiven N (4 <= N <= 100) rectangles and the lengths of their sides ( integers in the range 1..1,000), write a program that finds the maximum K for which there is a sequence of K of the原创 2015-05-06 22:08:47 · 740 阅读 · 0 评论 -
【搜索】哈密顿绕行世界问题
Description一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m=1.m=0退出. Output输出从第m个城市出发经过每个城市1次又回到原创 2016-04-21 08:41:29 · 585 阅读 · 0 评论 -
第六届ACM省赛 Card Trick
描述The magician shuffles a small pack of cards, holds it face down and performs the following procedure:The top card is moved to the bottom of the pack. The new top card is dealt face up onto the原创 2015-04-06 13:22:01 · 798 阅读 · 0 评论 -
FZU2184【逆序数还原】
Description有一段时间Eric对逆序数充满了兴趣,于是他开始求解许多数列的逆序数(对于由1...n构成的一种排列数组a,逆序数即为满足iaj的数字对数),但是某天他发现自己遗失了原来的数列,只留下之前计算过程中留下的各个数字对应的逆序数,现在请你帮他还原出原序列。Input数据有多组,请处理到文件结尾。每组数据第一行为一个整数N(1第二行为N个原创 2015-04-22 21:05:46 · 512 阅读 · 0 评论 -
【ACM河南省赛第五四原题】Substring
描述You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of input. In case of a tie, return the string that occurs原创 2015-04-02 21:21:33 · 811 阅读 · 0 评论 -
2013多校联合4【Problem A: ZZ买衣服】
DescriptionZZ是ACM队的漂亮MM,虽然是一个屌丝ACMer,但是还是有一颗爱美的心。ZZ像所有的女孩子一样,喜欢买各种衣服,可是ZZ有个特别的习惯,就是不买同一个品牌的衣服,可是品牌那么多,怎么辨别哪些买过,哪些没有买过呢?这可难倒了ZZ,同作为ACMer的你,来帮帮ZZ吧!至今为止ZZ已经买过N个品牌的衣服,接下来还要一次一次的买M个品牌的衣服,请你告诉她,哪些能买原创 2014-05-05 08:08:18 · 669 阅读 · 0 评论 -
蛇形取数之【特殊的三角形】
题目描述有这样一种特殊的N阶的三角形,当N等于3和4时,矩阵如下:请输出当为N时的三角形。输入格式输入有多组数据,每行输入一个正整数N,1输出按照给出的样例进行输出样例输入3样例输出1 2 63 54#includeint n,i,j,a[100][100],p,q,t,s;void print(){ for(i=0;i<n;++i) { pr原创 2014-04-23 09:04:47 · 1702 阅读 · 0 评论 -
wiki 【1294 全排列 】
题目描述 Description给出一个n, 请输出n的所有全排列输入描述 Input Description读入仅一个整数n (1输出描述 Output Description一共n!行,每行n个用空格隔开的数,表示n的一个全排列。并且按全排列的字典序输出。样例输入 Sample Input原创 2014-05-15 10:22:47 · 878 阅读 · 0 评论 -
CodeForces 414A Mashmokh and Numbers(模拟)
DescriptionIt's holiday. Mashmokh and his boss, Bimokh, are playing a game invented by Mashmokh.In this game Mashmokh writes sequence of n distinct integers on the board. Then Bimokh makes sever原创 2014-05-17 09:58:42 · 673 阅读 · 0 评论 -
湖南11省赛【E】 盒子游戏
有两个相同的盒子,其中一个装了 n个球,另一个装了一个球。Alice和 Bob发明了一个游戏,规则如下:ice和 Bob轮流操作,Alice先操作。每次操作时,游戏者先看看哪个盒子里的球的数目比较少,然后清空这盒子(盒子里的球直接扔掉),然后把另一个盒子里的球拿一些到这个盒子中,使得两个盒子都至少有一个。如果一个游戏者无法进行操作,他(她)就输了。下图是一个典型的游戏:原创 2014-05-19 09:56:35 · 851 阅读 · 0 评论 -
湖南11省赛【B】 报数游戏
n个人站成一行玩一个报数游戏。所有人从左到右编号为 1到 n。游戏开始时,最左边的人报 1,他右边人报 2,编号为 3的人报 3,等等。当编号为 n的人(即最右边的人)报完 n之后,轮到他左边的人(即编号n-1的人)报 n+1,然后编号为 n-2的人报 n+2,以此类推。当最左边的人再次报数之后,报数方向又变成从到右,依次类推。 为了防止游戏太无聊,报数时有一个特例:如果应该报的数原创 2014-05-19 08:51:47 · 879 阅读 · 0 评论 -
湖南11省赛【A】 一二三
你弟弟刚刚学会写英语的一(one)、二(two)和三(three)。他在纸上写了好些一二三,可惜有些字母写错了。已知每个单词最多有一个字母写错了(单词长度肯定不会错),你能认出他写的啥吗? 输入 第一行为单词的个数(不超过 10)。以下每行为一个单词,单词长度正确,且最多有一个字母写错。所有字母都是小写的。 输出 对于每组测试数据,输出一行,即该单词的阿拉伯数原创 2014-05-19 09:11:43 · 1266 阅读 · 0 评论 -
[1337] Dumb Typo
Hello everyone who is partcipate in the Fighting For 2014 Contest, I'm MatRush. This is the simplest problem today, no algorithm knowledge needed, But it's also the hardest problem today if you are no原创 2014-05-22 10:00:44 · 657 阅读 · 0 评论 -
2012山东大学校赛,高年级组【Problem F 一字棋 】
Problem F 一字棋Time Limit: 3000MS【 【 【 【 Description Description Description Description 】 】 】 】“ 一字棋 ” 由 A 、 B 两名棋手交替在 3*3 的棋盘上下棋 , 轮到谁走棋谁就往空格上放一只自己的棋子 , 先使自己的棋子构成 “ 三子成一线 ” ( 同一行或列或对角线全是某人的棋子原创 2014-05-23 19:15:32 · 1277 阅读 · 0 评论 -
简单题-【锤锤的饭店】
题目描述 我叫王大锤,这次我是一名优秀的服务生。老板交给我一个人光荣而又艰巨的任务,让我为明天来吃饭的”顾客“准备好明天要用的椅子。由于我们饭店比较出名,所以只接待黑帮团伙。老板说,明天会有N个团伙来吃饭,每个团伙来的时间Si,结束时间Ei,人数Pi。我只是一个小小的服务生,哪敢惹了这帮家伙,在他们来到时必须有椅子坐,不然我就惨了。我该最少要准备几把椅子呢?PS:一原创 2014-08-02 21:09:26 · 1176 阅读 · 0 评论 -
小猴子的难题(四)
题目描述小猴子五星级大饭店办的有声有色的进行着,十一过后旅游的人,相应的也就少了,师徒四人闲着没事也能欢快的唱唱歌啊,跳跳舞什么的,昨天还举办了一场晚会呢,八戒,沙僧合唱了一首小苹果,让游客们拍手叫好啊,昨天小猴子去市里开会去了,今天下午才回来,也不知道有什么事情要发生呢。等到了晚上,八戒叫到“大师兄,你回来了,会开的如何啊”,“唉,别提了,市里面提倡节能环保,原创 2014-08-03 13:20:00 · 823 阅读 · 0 评论 -
【七种qsort排序方法 】
在c++中qsort()排序函数的使用qsort函数应用大全 七种qsort排序方法 一、对int类型数组排序 int num[100]; Sample: int cmp ( const void *a , const void *b ) { return *(int *)a - *(int *)b; } qsort(num,100,si原创 2014-07-29 19:57:20 · 1478 阅读 · 0 评论 -
CodeForces 55A. Flea travel
DescriptionA flea is sitting at one of the n hassocks, arranged in a circle, at the moment. After minute number k the flea jumps through k - 1hassoсks (clockwise). For example, after the first m原创 2014-10-14 22:01:18 · 1249 阅读 · 0 评论 -
【Best Coder】Go to movies
问题描述寒假啦!为了打发无聊的时光,同时增进男女之间的感情,身为班长的乐乐打算带领大家看电影。寒假时期的电影票往往很贵,于是乐乐决定团购。输入描述有多组测试数据,大约20组。输入包含多组数据,对于每组数据,第一行包含两个整数n和m,n表示有多少学生参加,m表示提供团购的电影院数。接下来m行,每行两个整数a和b,表示每个电影院提供的团购方案,可以用b元买a张票。(1≤n,m,a原创 2015-03-23 20:42:21 · 742 阅读 · 0 评论 -
计蒜之道 测试赛【作弊揭发者】
鉴于我市拥堵的交通状况,市政交管部门经过听证决定在道路两侧安置自动停车收费系统。当车辆驶入车位,系统会通过配有的摄像头拍摄车辆画面,通过识别车牌上的数字、字母序列识别车牌,通过连接车管所车辆信息数据库确认车辆,进行扣费。斗智斗勇的好戏一般从此处展开…一些车主通过在停车时遮挡车牌上的一个或多个数字、字母序列,来阻碍识别系统的识别工作,以此逃避停车费用的缴纳。车主这简直是用轻轻的一挡搞原创 2015-07-14 08:43:14 · 1258 阅读 · 0 评论