自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(64)
  • 收藏
  • 关注

原创 Extreme (II)

题目链接题意: 计算gcd(1,n)+gcd(2,n)+...+gcd(n-1, n);解题思路:    1. 设f(n) = gcd(1,n)+gcd(2,n)+...+gcd(n-1,n);         s(n) = f(2)+f(3)+...+f(n) (n>=2);       即: s(n) = s(n-1)+f(n);     2

2017-04-30 21:28:34 323

原创 Mysterious Bacteria

Dr. Mob has just discovered a Deathly Bacteria. He named it RC-01. RC-01 has a very strange reproduction system. RC-01 lives exactlyx days. Now RC-01 produces exactly p new deadly Bacteria wherex

2017-04-30 19:42:50 729

原创 Farey Sequence

Farey SequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16270 Accepted: 6463DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the se

2017-04-30 16:18:14 246

原创 Prime Time

题目链接题意:让你找a~b之间的数i,根据这个式子,根据这个式子的结果是不是素数,找出a~b之间素数的占的比率*100.注意精度问题#include#include#include#includeusing namespace std;#define LL long longint prim[100000005];int num[10005];int we(int n)//

2017-04-30 15:04:55 636

原创 Functions again

Something happened in Uzhlyandia again... There are riots on the streets... Famous Uzhlyandian superheroes Shean the Sheep and Stas the Giraffe were called in order to save the situation. Upon the arr

2017-04-30 11:43:49 378

原创 FATE 完全背包

FATETime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13629    Accepted Submission(s): 6447Problem Description最近xhd正在玩一款叫做FATE的游戏,

2017-04-30 09:56:00 462

原创 Stealing Harry Potter's Precious

Harry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwarts school is in holiday, Harry Potter has to go back to uncle Vernon's home. But he can't bring his pr

2017-04-29 20:29:47 429

原创 2016

给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量:1. 1≤a≤n,1≤b≤m;2. a×b 是 2016 的倍数。Input输入包含不超过 30 组数据。每组数据包含两个整数 n,m (1≤n,m≤10 9).Output对于每组数据,输出一个整数表示满足条件的数量。

2017-04-29 08:11:45 248

原创 Trailing Zeroes (III)

You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you knowN! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the

2017-04-28 10:10:36 415

原创 试看书林隐处

Far far away, there live a lot of dogs in the forest. Unlike other dogs, those dogs love candies much more than bones. Every candy has two attributes: the sweetness degree p and the sourness degre

2017-04-27 20:05:05 1205

原创 Pairs Forming LCM

Find the result of the following code:long long pairsFormLCM( int n ) {    long long res = 0;    for( int i = 1; i  n; i++ )        for( int j = i; j  n; j++ )           if( lcm(i, j) ==

2017-04-27 17:33:14 353

原创 Large Division

Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only if there exists an integer c such that a = b * c.

2017-04-26 20:09:33 218

原创 Rectangles 最长自增子序列

问题 H: Rectangles时间限制: 1 Sec  内存限制: 64 MB提交: 13  解决: 3[提交][状态][讨论版]题目描述Given N (4 <= N <= 100)  rectangles and the lengths of their sides ( integers in the range 1..1,000), write a progra

2017-04-26 17:05:32 300

原创 Ancient Go

Yu Zhou likes to play Go with Su Lu. From the historical research, we found that there are much difference on the rules between ancient go and modern go. Here is the rules for ancient go they were

2017-04-25 18:01:19 461

原创 物资调度

问题 B: 物资调度时间限制: 1 Sec  内存限制: 64 MB提交: 5  解决: 2[提交][状态][讨论版]题目描述某地区发生了地震,灾区已经非常困难,灾民急需一些帐篷、衣物、食品和血浆等物资。可通往灾区的道路到处都是塌方,70%以上的路面损坏,桥梁全部被毁。国家立即启动应急预案,展开史上最大强度非作战空运行动,准备向灾区空投急需物资。一方有难,八方支援。

2017-04-25 08:35:33 760

原创 山区修路

问题 D: 山区修路时间限制: 1 Sec  内存限制: 64 MB提交: 9  解决: 2[提交][状态][讨论版]题目描述某山区的孩子们上学必须经过一条凹凸不平的土路,每当下雨天,孩子们非常艰难。现在村里走出来的Dr. Kong决定募捐资金重新修建着条路。由于资金有限,为了降低成本,对修好后的路面高度只能做到单调上升或单调下降。为了便于修路,我们将整个土路分

2017-04-24 17:46:26 1234 1

原创 海岛争霸

问题 A: 海岛争霸时间限制: 1 Sec  内存限制: 64 MB提交: 3  解决: 2[提交][状态][讨论版]题目描述神秘的海洋,惊险的探险之路,打捞海底宝藏,激烈的海战,海盗劫富等等。加勒比海盗,你知道吧?杰克船长驾驶着自己的的战船黑珍珠1号要征服各个海岛的海盜,最后成为海盗王。 这是一个由海洋、岛屿和海盗组成的危险世界。杰克船长准备从自己所占领的岛屿A开

2017-04-24 10:01:44 300

原创 魔法宝石 spfa

1262: 魔法宝石时间限制: 2 秒  内存限制: 64 MB提交: 248  解决: 48提交 状态 题目描述小s想要创造n种魔法宝石。小s可以用ai的魔力值创造一棵第i种魔法宝石,或是使用两个宝石合成另一种宝石(不消耗魔力值)。请你帮小s算出合成某种宝石的所需的最小花费。输入第一行为数据组数T(1≤T≤3)。对于每组数据,首先一行为n,m(1≤n,

2017-04-23 21:24:09 415

原创 Interference Signal

问题 G: Interference Signal时间限制: 2 Sec  内存限制: 64 MB提交: 3  解决: 3[提交][状态][讨论版]题目描述Dr.Kong’s laboratory monitor some interference signals. The interference signals can be digitized into a serie

2017-04-21 20:00:22 441

原创 最大岛屿

最大岛屿时间限制:1000 ms  |  内存限制:65535 KB难度:2描述神秘的海洋,惊险的探险之路,打捞海底宝藏,激烈的海战,海盗劫富等等。加勒比海盗,你知道吧?杰克船长驾驶着自己的的战船黑珍珠1号要征服各个海岛的海盜,最后成为海盗王。  这是一个由海洋、岛屿和海盗组成的危险世界。面对危险重重的海洋与诡谲的对手,如何凭借智慧与运气,建立起一个强大的海盗帝国。杰克船长手头

2017-04-21 16:37:21 296

原创 引水工程 最小生成树

问题 D: 引水工程时间限制: 2 Sec  内存限制: 64 MB提交: 5  解决: 5[提交][状态][讨论版]题目描述南水北调工程是优化水资源配置、促进区域协调发展的基础性工程,是新中国成立以来投资额最大、涉及面最广的战略性工程,事关中华民族长远发展。“南水北调工程”,旨在缓解中国华北和西北地区水资源短缺的国家战略性工程。就是把中国长江流域丰盈的水资源抽调一部分送到

2017-04-21 11:28:15 397

原创 Clock

Given a time HH:MM:SS and one parameter aa, you need to calculate next time satisfying following conditions: 1. The angle formed by the hour hand and the minute hand is aa. 2. The time may not

2017-04-20 21:42:03 488

转载 Combine String

Given three strings aa, bb and cc, your mission is to check whether cc is the combine string of aa and bb. A string cc is said to be the combine string of aa and bb if and only if cc can b

2017-04-19 19:25:38 771

原创 最少换乘

问题 C: 最少换乘时间限制: 2 Sec  内存限制: 64 MB提交: 3  解决: 2[提交][状态][讨论版]题目描述 欧洲某城是一个著名的旅游胜地,每年都有成千上万的人前来观光旅行。Dr. Kong决定利用暑假好好游览一番。。年轻人旅游不怕辛苦,不怕劳累,只要费用低就行。但Dr. Kong年过半百,他希望乘坐BUS从住的宾馆到想去游览的景点,期间尽可量

2017-04-19 09:53:44 854

转载 Room

问题 G: Room时间限制: 1 Sec  内存限制: 64 MB提交: 15  解决: 12[提交][状态][讨论版]题目描述The ACM / ICPC team has a large room, the length and width of which is 10^6 . However, the guys in ACM / ICPC teams are too l

2017-04-18 21:46:33 392

原创 信道安全

问题 C: 信道安全时间限制: 1 Sec  内存限制: 64 MB提交: 8  解决: 6[提交][状态][讨论版]题目描述Alpha 机构有自己的一套网络系统进行信息传送。情报员 A 位于节点 1,他准备将一份情报 发送给位于节点 n 的情报部门。可是由于最近国际纷争,战事不断,很多信道都有可能被遭到监 视或破坏。 经过测试分析,Alpha 情报系统获得了网络中每段信道安全

2017-04-18 17:27:25 1928

原创 问题 E: 机器设备

问题 E: 机器设备时间限制: 1 Sec  内存限制: 64 MB提交: 16  解决: 7[提交][状态][讨论版]题目描述Alpha 公司设计出一种节能的机器设备。它的内部结构是由 N 个齿轮组成。整个机器设备有 一个驱动齿轮,当启动它时,它立即按 10,000 圈/小时转速顺时针转动,然后它又带动与它相切 的齿轮反方向,即逆时针转动。齿轮之间互相作用,每个齿轮都可能

2017-04-18 16:18:47 312

原创 Decimal integer conversion

问题 F: Decimal integer conversion时间限制: 1 Sec  内存限制: 64 MB提交: 9  解决: 7[提交][状态][讨论版]题目描述XiaoMing likes mathematics, and he is just learning how to convert numbers between different bases , but

2017-04-17 20:09:07 391

原创 Kids’ Riddle

问题 B: Kids’ Riddle时间限制: 1 Sec  内存限制: 512 MB提交: 31  解决: 8[提交][状态][讨论版]题目描述Friends, have you ever taken the April Fools Contest 2017 at Codeforces? There is a problem called Kids’ Riddle. The

2017-04-17 17:24:17 660

转载 Help Hanzo 区间的素数的个数

Amakusa, the evil spiritual leader has captured the beautiful princess Nakururu. The reason behind this is he had a little problem with Hanzo Hattori, the best ninja and the love of Nakururu. After he

2017-04-17 15:57:14 414

转载 Sigma Function

Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a number. For example σ(24) = 1+2+3+4

2017-04-17 14:40:08 815

原创 青蛙的约会

两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两只乐观的青蛙,

2017-04-17 12:59:00 333

原创 Intervals

Chiaki has n intervals and the i-th of them is [li, ri]. She wants to delete some intervals so that there does not exist three intervals a, b and c such that a intersects with b, b intersects with

2017-04-16 19:04:29 572

原创 Harmonic Number

In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers:In this problem, you are given n, you have to find Hn.InputInput starts with an integer T

2017-04-16 15:37:22 323

原创 Maximum GCD

就是输入有点问题,找最大的时候可以暴力#include#include#include#includeusing namespace std;int gcd(int a,int b){ if(b==0) return a; else return gcd(b,a%b);}char a[10005];int b[10005];i

2017-04-16 12:50:26 269

原创 Course Selection System 01背包

There are n courses in the course selection system of Marjar University. The i-th course is described by two values: happiness Hi and credit Ci. If a student selects m courses x1, x2, ..., xm, then

2017-04-15 21:22:08 1484

原创 A Bug's Life

A Bug's LifeTime Limit: 15000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15110    Accepted Submission(s): 4913Problem DescriptionBackground 

2017-04-14 21:06:03 616

原创 ROADS

ROADSTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14806 Accepted: 5360DescriptionN cities named with numbers 1 ... N are connected with one-way roads.

2017-04-14 10:23:32 533

原创 Rikka with Tree

Rikka with TreeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 886    Accepted Submission(s): 405Problem DescriptionAs we know, Rikk

2017-04-13 12:46:06 305

原创 Friends number

Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then, everything is changing… (The story in “the snow queen”).

2017-04-12 19:36:36 655

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除