07 2017 档案

摘要:There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he c 阅读全文
posted @ 2017-07-31 18:15 ⊙∽⊙Perseverance 阅读(170) 评论(0) 推荐(0)
摘要:Fox Ciel is playing a mobile puzzle game called "Two Dots". The basic levels are played on a board of size n × m cells, like this: Each cell contains 阅读全文
posted @ 2017-07-31 15:34 ⊙∽⊙Perseverance 阅读(171) 评论(0) 推荐(0)
摘要:The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of 阅读全文
posted @ 2017-07-31 14:47 ⊙∽⊙Perseverance 阅读(117) 评论(0) 推荐(0)
摘要:Problem Description Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N.Two inte 阅读全文
posted @ 2017-07-30 20:55 ⊙∽⊙Perseverance 阅读(117) 评论(0) 推荐(0)
摘要:1 #include 2 int num[6] = {2,3,5,7}; 3 int n; 4 int solve() 5 { 6 int ans = 0; //是那四个数的倍数的数的数量 7 for (int i = 1 ; i < (1<<4) ; i++) //选数 8 { 9 int ant = 0... 阅读全文
posted @ 2017-07-30 18:03 ⊙∽⊙Perseverance 阅读(184) 评论(0) 推荐(0)
摘要:也就是求小于或等于n的互质数的个数 阅读全文
posted @ 2017-07-30 18:00 ⊙∽⊙Perseverance 阅读(109) 评论(0) 推荐(0)
摘要:Description The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers 阅读全文
posted @ 2017-07-30 17:30 ⊙∽⊙Perseverance 阅读(140) 评论(0) 推荐(0)
摘要:You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For e 阅读全文
posted @ 2017-07-29 11:19 ⊙∽⊙Perseverance 阅读(238) 评论(0) 推荐(0)
摘要:Pie Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8851 Accepted Submission(s): 3225 Problem Des 阅读全文
posted @ 2017-07-29 10:57 ⊙∽⊙Perseverance 阅读(182) 评论(0) 推荐(0)
摘要:1037: 一个简单的数学题 [数学] 题目描述 小明想要知道$a^b$的值,但是这个值会非常的大。 所以退而求其次,小明想让你帮他求出来$(a^b) \% c$的值。 小明想要知道$a^b$的值,但是这个值会非常的大。 所以退而求其次,小明想让你帮他求出来$(a^b) \% c$的值。 输入 第一 阅读全文
posted @ 2017-07-28 08:45 ⊙∽⊙Perseverance 阅读(108) 评论(0) 推荐(0)
摘要:Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。给定一个区间 阅读全文
posted @ 2017-07-26 22:26 ⊙∽⊙Perseverance 阅读(209) 评论(0) 推荐(0)
摘要:描述 学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办。小刘的工作就是安排学校小礼堂的活动,每个时间最多安排一个活动。现在小刘有一些活动计划的时间表,他想尽可能的安排更多的活动,请问他该如何安排。 阅读全文
posted @ 2017-07-26 20:09 ⊙∽⊙Perseverance 阅读(161) 评论(0) 推荐(0)
摘要:描述 现有一块草坪,长为20米,宽为2米,要在横中心线上放置半径为Ri的喷水装置,每个喷水装置的效果都会让以它为中心的半径为实数Ri(0<Ri<15)的圆被湿润,这有充足的喷水装置i(1<i<600)个,并且一定能把草坪全部湿润,你要做的是:选择尽量少的喷水装置,把整个草坪的全部湿润。 阅读全文
posted @ 2017-07-26 18:11 ⊙∽⊙Perseverance 阅读(153) 评论(0) 推荐(0)
摘要:描述 给你一个非负数整数n,判断n是不是一些数(这些数不允许重复使用,且为正数)的阶乘之和,如9=1!+2!+3!,如果是,则输出Yes,否则输出No; 阅读全文
posted @ 2017-07-26 16:38 ⊙∽⊙Perseverance 阅读(150) 评论(0) 推荐(0)
摘要:题目描述: 输入: 输出: 样例输入: 样例输出: 这个题可以建树也可以不建树。 不建树比较容易。首先要明确,题目要求输出的乘积之和,其实就是哈夫曼树中去除叶节点之外,其他节点的值的和。比如 题目要求意思是 1*4+2*4+2*3+5*2+9*1=37 其实可以直接 3+5+10+19=37 明白了 阅读全文
posted @ 2017-07-26 13:07 ⊙∽⊙Perseverance 阅读(204) 评论(0) 推荐(0)
摘要:Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets so as the following conditions hold: Help Vita 阅读全文
posted @ 2017-07-25 22:39 ⊙∽⊙Perseverance 阅读(151) 评论(0) 推荐(0)
摘要:ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart 阅读全文
posted @ 2017-07-25 18:31 ⊙∽⊙Perseverance 阅读(147) 评论(0) 推荐(0)
摘要:使用标准库的栈和队列时,先包含相关的头文件 #include<stack> #include<queue> using namespace std; 定义栈如下: stack<int> stk; 定义队列如下: queue<int> q; 栈提供了如下的操作 [cpp] view plain cop 阅读全文
posted @ 2017-07-25 10:22 ⊙∽⊙Perseverance 阅读(134) 评论(0) 推荐(0)
摘要:题目:找出n以内的素数(n<100) 这里只找出一组 代码: 阅读全文
posted @ 2017-07-24 21:42 ⊙∽⊙Perseverance 阅读(185) 评论(0) 推荐(0)
摘要:Problem Description “Point, point, life of student!”This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. H 阅读全文
posted @ 2017-07-24 18:16 ⊙∽⊙Perseverance 阅读(195) 评论(0) 推荐(0)
摘要:链接:http://codeforces.com/problemset/problem/653/A A. Bear and Three Balls time limit per test 2 seconds memory limit per test 256 megabytes input stan 阅读全文
posted @ 2017-07-24 11:26 ⊙∽⊙Perseverance 阅读(211) 评论(0) 推荐(0)
摘要:还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希只想让你把答案中最大的M个数告诉她就可以了。 给定一个包含N(N<=3000)个正整数的序列,每个数不超过5000,对它们两两相加得到的 阅读全文
posted @ 2017-07-24 11:13 ⊙∽⊙Perseverance 阅读(143) 评论(0) 推荐(0)
摘要:每天第一个到机房的人要把门打开,最后一个离开的人要把门关好。现有一堆杂乱的机房签 到、签离记录,请根据记录找出当天开门和关门的人。 Input 测试输入的第一行给出记录的总天数N ( > 0 )。下面列出了N天的记录。 每天的记录在第一行给出记录的条目数M ( > 0 ),下面是M行,每行的格式为  阅读全文
posted @ 2017-07-24 11:05 ⊙∽⊙Perseverance 阅读(181) 评论(0) 推荐(0)
摘要:Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。 Input 测试输入包含若干测试用例。每个测试用例的第1行包含两个整数 N (<=100000) 和 C,其中 N 是纪录的条数,C 是指定排序的列号。以下有 N 行,每行包含一条学生纪录。每条学生纪录由学号(6位数字,同组测试 阅读全文
posted @ 2017-07-24 10:56 ⊙∽⊙Perseverance 阅读(208) 评论(0) 推荐(0)
摘要:大家都知道,快速排序是不稳定的排序方法。 如果对于数组中出现的任意aii,ajj(i<j),其中aii==ajj,在进行排序以后aii一定出现在ajj之前,则认为该排序是稳定的。 某高校招生办得到一份成绩列表,上面记录了考生名字和考生成绩。并且对其使用了某排序算法按成绩进行递减排序。现在请你判断一下 阅读全文
posted @ 2017-07-24 10:25 ⊙∽⊙Perseverance 阅读(349) 评论(0) 推荐(0)