自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

YoungForYou_的博客

"做自己感兴趣的事情,学想学的知识,不要怕走偏了,如果有人说不务正业,那就让他们说去吧。如果你能远离传统的路子,将会不同凡响" -Steve Jobs

  • 博客(16)
  • 收藏
  • 关注

原创 CodeForces 701A Cards(水)

A. Cards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are n cards (n is even) in the deck. Each c

2017-04-30 14:17:05 630

原创 Codeforces 270A - Fancy Fence

A. Fancy Fence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Emuskald needs a fence around his farm, but

2017-04-19 17:38:44 642

原创 Codeforces 467B Fedor and New Game

B. Fedor and New Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output After you had helped George and Alex t

2017-04-16 20:22:12 561

转载 C语言:位异或运算符^

位运算符家族中,最常用的,某过于异或运算符。 异或运算符是指: 参与运算的两个值,如果两个相应位相同,则结果为0,否则为1。即:0^0=0, 1^0=1, 0^1=1, 1^1=0 例如:10100001^00010001=10110000 0^0=0,0^1=1    可理解为: 0异或任何数,其结果=任何数 1^0=1,1^1=0    可理解为: 1异或任何数,其结果

2017-04-16 20:17:26 711

转载 欧拉函数

欧拉函数的定义:E(k)=([1,n-1]中与n互质的整数个数).          因为任意正整数都可以唯一表示成如下形式:                      k=p1^a1*p2^a2*……*pi^ai;(即分解质因数形式)     可以推出:E(k)=(p1-1)(p2-1)……(pi-1)*(p1^(a1-1))(p2^(a2-1))……(pi^(ai-1))

2017-04-08 11:31:22 342

原创 Codeforces 131A - cAPS lOCK

A. cAPS lOCK time limit per test 0.5 second memory limit per test 256 megabytes input standard input output standard output wHAT DO WE NEED cAPS LOCK FOR? Caps lock i

2017-04-03 19:26:08 356

原创 HDU 2034 人见人爱A-B

人见人爱A-B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 78908    Accepted Submission(s): 22025 Problem Description 参加过上个月月赛的同学一定还记得其中的一

2017-03-05 11:37:58 372

原创 CodeForces 110A Nearly Lucky Number

Description Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744

2017-03-05 09:21:20 377

原创 CodeForces - 112A Petya and Strings

Little Petya loves presents. His mum bought him two strings of the same size for his birthday. The strings consist of uppercase and lowercase Latin letters. Now Petya wants to compare those two string

2017-03-04 20:46:54 547

原创 poj 1007 DNA Sorting

One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measure is 5,

2017-03-04 17:24:00 407

原创 POJ1338 Ugly Numbers

Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ... shows the first 10 ugly numbers. By convention, 1 is included. Given the intege

2017-03-04 14:08:55 315

原创 UVA 11039 Building designing

思路:把数列按绝对值从小到大排列,然后判断正负数相间的个数。 代码如下: #include #include #include #include using namespace std; int a[500001]; bool cmp(int a,int b) { return abs(a) } int main() { int n; scanf("%d",&n);

2017-03-04 10:05:52 473

原创 UVA10474 Where is the Marble?

Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after another in ascending order of the number

2017-03-04 08:57:11 314

原创 CodeForces 271A - Beautiful Year

It seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distinct digits. Now you are suggested to solve the fol

2017-02-20 18:09:21 806

原创 HDU 2028 Lowest Common Multiple Plus

Problem Description 求n个数的最小公倍数。   Input 输入包含多个测试实例,每个测试实例的开始是一个正整数n,然后是n个正整数。   Output 为每组测试数据输出它们的最小公倍数,每个测试实例的输出占一行。你可以假设最后的输出是一个32位的整数。   Sample Input 2 4 6 3 2 5 7  

2017-02-17 17:34:37 497

原创 Hdu 2027 - 统计元音

统计每个元音字母在字符串中出现的次数。 Input输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串。 Output对于每个测试实例输出5行,格式如下: a:num1 e:num2 i:num3 o:num4 u:num5 多个测试实例之间由一个空行隔开。 请特别注意:最后一块输出后面没有空行:) Sample Inp

2017-02-17 16:12:09 415

空空如也

空空如也

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

TA关注的人

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