题目描述 We know thatif a phone number A is another phone number B's prefix, B is not able to becalled. For an example, A is 123 while B is 12345, after pressing 123, we callA, and not able to call B. Given N phone numbers, your task is to find whether t…
题目描述 We know thatIvan gives Saya three problems to solve (Problem F), and this is the firstproblem. "We need a programmer to help us for some projects. If you show us that youor one of your friends is able to program, you can pass the first hurdle. I…
Binomial Coeffcients TimeLimit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 输入 输出 示例输入 1 1 10 2 954 723 示例输出 /******************* 组合数学 组合数 用 递推  :组合数公式 C[n][m] = C[n-1][m-1] + C[n-1][m] ************************/ Code: #include <iostream> #include…
Crack Mathmen TimeLimit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Since mathmen take security very seriously, theycommunicate in encrypted messages. They cipher their texts in this way: for everycharacther c in the message, they replace c with…
表达式求值 时间限制:1000 ms | 内存限制:65535 KB 难度:3   描述 假设表达式定义为:1. 一个十进制的正整数 X 是一个表达式.2. 如果 X 和 Y 是 表达式,则 X+Y, X*Y 也是表达式; *优先级高于+.3. 如果 X 和 Y 是 表达式,则 函数 Smax(X,Y)也是表达式,其值为:先分别求出 X ,Y值的各位数字之和,再从中选最大数.4.如果 X 是 表达式,则 (X)也是表达式. 例如:表达式 12*(2+3)+Smax(333,220+280) 的值…
Ivan comes again! Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 The Fairy Ivan gave Saya three problems to solve (Problem F). After Saya finished the first problem (Problem H), here comes the second.This is the enhanced version of Proble…
Greatest Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Saya likes math, because she think math can make her cleverer. One day, Kudo invited a very simple game: Given N integers, then the players choose no more than four integers f…
Phone Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 12345, after pressing 123, we call A, and not…
Description BIGZHUGOD and his three friends are playing a game in a triangle ground. The number of BIGZHUGOD is 0, and his three friends are numbered from 1 to 3. Before the game begins, three friends stand on three vertices of triangle in numerical…
Description A Swiss-system tournament is a tournament which uses a non-elimination format. The first tournament of this type was a chess tournament in Zurich in 1895, hence the name "Swiss system". The tournament will be held based on following…
Description In mathematics, a square number is an integer that is the square of an integer. In other words, it is the product of some integer with itself. For example, 9 is a square number, since it can be written as 3 * 3. Given an array of distinct…
Biggest Number 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描述 You have a maze with obstacles and non-zero digits in it: You can start from any square, walk in the maze, and finally stop at some square. Each step, you may only walk into one of the four neighb…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1511 题目大意:在一个8*8的棋盘中,给你一个起点位置和一个终点位置,同时也给你一个陷阱位置,问你从起点绕过陷阱到终点的最短距离.(可以上下左右走还可以斜走) 解题思路:可以直接用搜索,也可以用数学知识来解决,我们之前学过,两点之间直接最短,所以当陷阱不在这条直线上的时候,我们就不用考虑陷阱了,直接是max(abs(x1-y1),abs(x2-y2))最终结果, 但是如果陷阱在两条直线…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1507 解题思路:这是一道模拟题,看了那么多人的代码,我觉得我的代码是最简的,哈哈,其实就是分数变幻的时候要计算灯管的亮数复杂一点,我就直接暴力咯 AC代码: #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> using namespace std;…
Description Edward  得到了一个长度为  N  的整数序列,他想找出这里面有多少个“幸运的”连续子序列.一个连续子序列被称为“幸运的”,当且仅当该子序列内的整数之和恰好是  K  的整数倍数.他请求你写一个程序来计算他喜欢的连续子序列个数. Input 输入第一行是一个整数  T,表示有  T  组数据.每组数据第一行是两个整数  N (1 <= N <= 10^6), K (1 <= K <= 10^9).接下来的一行包含  N  个整数  Ai (|Ai| &…
Description We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 12345, after pressing 123, we call A, and not able to call B. Given N phone numbers, your task is to find…
Description Both Saya and Kudo like balloons. One day, they heard that in the central park, there will be thousands of people fly balloons to pattern a big image. They were very interested about this event, and also curious about the image. Since the…
Fibonacci Time Limit: 2000MS Memory limit: 131072K 题目描述 Fibonacci numbers are well-known as follow: Now given an integer N, please find out whether N can be represented as the sum of several Fibonacci numbers in such a way that the sum does not inclu…
Memory Leak Time Limit: 2000MS Memory limit: 131072K 题目描述 Memory Leak is a well-known kind of bug in C/C++. When a string is longer than expected, it will visit the memory of next array which will cause the issue and leak some information. You can se…
Reversed Words Time Limit: 2000MS Memory limit: 131072K 题目描述 Some aliens are learning English. They have a very strange way in writing that they revered every word in the sentence but keep all the words in common order. For example when they want to…
Triple Nim Time Limit: 2000MS Memory limit: 65536K 题目描述 Alice and Bob are always playing all kinds of Nim games and Alice always goes first. Here is the rule of Nim game: There are some distinct heaps of stones. On each turn, two players should remov…
The Binding of Isaac Time Limit: 2000MS Memory limit: 65536K 题目描述 Ok, now I will introduce this game to you... Isaac is trapped in a maze which has many common rooms- Like this-There are 9 common rooms on the map. And there is only one super-secret r…
Julyed Time Limit: 2000MS Memory limit: 65536K 题目描述 Julyed is preparing for her CET-6. She has N words to remember, but there is only M days left. If she can't remember all these words, she won't pass CET-6. If she can't pass CET-6, she will be unhap…
去年打完区域赛之后,面对着两个队友都去找实习的情况,我自己对今年省赛还是有点慌的.不只一次的像我的队友说明自己很慌,但是老曹跟会长都说:“没事,慌啥!”前几场训练赛因为老曹跟秋洁有面试有时候只能一个人打,对自己也是一个很大的挑战.最后几场训练赛跟队友配合的打感觉整个队伍的状态回升了.就这样揣着忐忑的心情来到了省赛现场.热身赛的时候我被会长分配去女队教学妹使用pc^2系统,看榜老曹会长A掉了热身赛的B题当时就感觉我们的实力还在,内心也是挺感动的,后来发现dy跟奕辰他们A掉了A题,赛后我回到自己队伍…
记第五届山东省ACM程序设计比赛 5月10日上午9点半左右,我们的队伍从学校出发,一个多小时后到达本次比赛的地点-哈尔滨工业大学. 报道,领材料,吃午饭,在哈工大的校园里逛了逛,去主楼的自习室歇息了一会.然后參加下午两点到四点的热身赛.不得不吐槽一下热身赛的题目,第一个题题目的数据范围写的是十的六次方,我们写出来提交怎么也不正确,后来快结束时看讨论板,管理人员说数据范围是十的九次方,无语了.第二个题目无输入,仅仅输出1到20之间的一个随机整数,题目上也明白说了是拼人品的题目,有的队伍"人品比較好…
链接:https://www.nowcoder.com/acm/contest/115/G来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 周末,小Q喜欢在PU口袋校园上参加各种活动刷绩点,体验丰富多彩的大学生活. 但是每个活动有各自的开始时间.结束时间.Happy值以及绩点数,活动之间可能存在时间冲突. 小Q是一个认真踏实的女孩,她在同一时间只会参加一个活动. 给出每一天的活动…
"九韶杯"河科院程序设计协会第一届程序设计竞赛 D数列重组  next_permutation 题目 原题链接: https://ac.nowcoder.com/acm/contest/13493/D 知识点 ----boolnext_permutation(BidrectionalIterator first,BidrectionalIterator last) next_permutation对一串数全排列时, 可以用它, 一般搭配do while() 但要注意的是, next_p…
本文是博主参加第一届前端体验大会 | 物勒工名做的分享<WePayUI组件设计的秘密>,内容主要分为2个部分: 一.浅析UI库/框架的未来 讨论的UI库或者框架,主要包含展示和交互的css框架或库,结合我这5年的工作经历,浅析他们的未来的发展状况,从而引出下个阶段的场景化设计. 二.场景化设计思路 详情请见PPT内容…
1352: New Sorting Algorithm Time Limit: 1 Sec  Memory Limit: 128 MB Description We are trying to use a new sorting algorithm to sort a sequence with distinct integers.    This algorithm will be end if the sequence is already in increasing order from…
1350: To Add Which? Time Limit: 1 Sec  Memory Limit: 128 MB Description There is an integer sequence with N integers. You can use 1 unit of cost to increase any integer in the sequence by 1.    Could you tell us the least units of cost to achieve tha…