随笔分类 -  其他

摘要:Description:定义f(i)代表i的所有因子和(包括1和i),给定一个l,r。求f(l)+f(l+1)+...+f(r)。Input:第一行输入一个t(t#include#include#include#include#includeusing namespace std;const int... 阅读全文
posted @ 2015-11-22 22:46 搁浅の记忆 阅读(291) 评论(0) 推荐(0)
摘要:Description:Adam and Eve play a card game using a regular deck of 52 cards. The rules are simple. The players sit on opposite sides of a table, facing... 阅读全文
posted @ 2015-11-09 19:01 搁浅の记忆 阅读(309) 评论(0) 推荐(0)
摘要:Description:The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only... 阅读全文
posted @ 2015-11-09 18:08 搁浅の记忆 阅读(275) 评论(0) 推荐(0)
摘要:Problem Description:We are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. ... 阅读全文
posted @ 2015-11-01 16:37 搁浅の记忆 阅读(300) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=96545#problem/EDescription:Given an array withnintegers, and you are given two indicesiandj... 阅读全文
posted @ 2015-10-27 12:00 搁浅の记忆 阅读(150) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=94610#problem/JproblemIn normal football games, the winner team gets 3 points, loser team g... 阅读全文
posted @ 2015-10-24 11:48 搁浅の记忆 阅读(269) 评论(0) 推荐(0)
摘要:Description:Kefa wants to celebrate his first big salary by going to restaurant. However, he needs company.Kefa hasnfriends, each friend will agree to... 阅读全文
posted @ 2015-10-12 17:51 搁浅の记忆 阅读(327) 评论(0) 推荐(0)
摘要:Given two integers A and B. Sequence S is defined as follow:• S0 = A• S1 = B• Si = |Si−1 − Si−2| for i ≥ 2Count the number of distinct numbers in S.In... 阅读全文
posted @ 2015-10-09 14:53 搁浅の记忆 阅读(282) 评论(0) 推荐(0)
摘要:Description:A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18... 阅读全文
posted @ 2015-09-27 10:19 搁浅の记忆 阅读(141) 评论(0) 推荐(0)
摘要:Description:For an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team fromNstudents of his universit... 阅读全文
posted @ 2015-08-17 19:54 搁浅の记忆 阅读(236) 评论(0) 推荐(0)
摘要:Problem Description:A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, ... 阅读全文
posted @ 2015-08-14 21:35 搁浅の记忆 阅读(166) 评论(0) 推荐(0)
摘要:题目描述我们把十进制整数依次写成一个字符串,123456789101112…请问第n位数码是多少?输入第一行是一个整数T(T≤10000),表示样例的个数。 每行输入一个整数n(1≤n≤788888899)。输出每行输出一个样例的结果。样例输入21788888899样例输出11#include#in... 阅读全文
posted @ 2015-04-26 16:01 搁浅の记忆 阅读(376) 评论(0) 推荐(1)
摘要:Problem DescriptionThe "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the ... 阅读全文
posted @ 2015-04-24 13:00 搁浅の记忆 阅读(165) 评论(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 A... 阅读全文
posted @ 2015-04-23 21:18 搁浅の记忆 阅读(194) 评论(0) 推荐(0)
摘要:素数1:#include#includeint Judge(int n){ int i, k; if (n == 0 || n == 1) return 0; k = sqrt(n); for (i = 2; i # define N 1000010 int a[N] = {1, 1}; void... 阅读全文
posted @ 2015-04-18 18:32 搁浅の记忆 阅读(169) 评论(0) 推荐(0)