自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 问答 (1)
  • 收藏
  • 关注

原创 六度空间

题目描述 在数学领域的有一个神秘迷人的猜想叫做六度空间理论: 你和任何一个陌生人之间所间隔的人不会超过六个,也就是说,最多通过五个中间人你就能够认识任何一个陌生人.PP是北京化工大学的一只普通单身汪,他每天总是早早的起床,然后屁颠屁颠的背上自己的小书包高高兴兴的去上课.PP觉得这样的生活很幸福. 然而周围总有一些可恶的邪恶汪在PP周围秀恩爱,喂PP吃狗粮.这打击到了PP,PP很生气,决心也找一个同

2017-11-26 20:09:42 269

原创 Educational Codeforces Round 33

A. Chess For Three time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Alex, Bob and Carl will soon participate in a team chess tour

2017-11-24 15:12:00 354

原创 大数模板

1.Java基本BigInteger:import java.util.*;import java.math.*;public class Test { public static void main(String[] args){ //输入 Scanner cin=new Scanner(System.in); BigInteger a=c

2017-11-06 15:47:00 274

原创 斐波那契数列

小牛:“话说,斐波那契数列1, 1, 2, 3, 5, 8, 13…是一个神奇的数列,它的……” !@#¥%……&(小牛被众人群殴——“就这玩意,谁不懂啊?”) 小牛:“咳咳,这可是我的地盘,听我的!这是一道水题,要求输入正数n,输出相应的第n个(从1计)斐波那契数。” !@#¥%……&(小牛再次被众人群殴——“去……水题水题

2017-11-03 00:09:02 347

原创 Educational Codeforces Round 31 A B C

A. Book Reading time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Recently Luba bought a very interesting book. She knows that it

2017-10-28 16:49:49 301

原创 Codeforces Round #443 (Div. 2) A B C

A. Borya’s Diagnosis time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output It seems that Borya is seriously sick. He is going visit n

2017-10-27 09:38:33 260

原创 UVA - 10474 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 n

2017-10-26 21:48:01 180

原创 Codeforces Round #442 (Div. 2) A B

A. Alex and broken contest time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output One day Alex was creating a contest about his friends

2017-10-24 13:01:30 227

原创 带头节点单链表操作

#include <iostream>#include <cstdio>#include <cstdlib>using namespace std;typedef long long LL;typedef struct Node{ int data; struct Node *next;}*List;//头插法建立长为n的链表void FrontCreateList(

2017-09-21 16:02:00 253

原创 A - Wireless Network

Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all com

2017-08-04 15:39:59 167

原创 G-POJ-3984 迷宫问题

POJ-3984 |Time Limit: 1000MS | Memory Limit: 65536K| |—– Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0

2017-07-30 16:11:46 258

原创 HDOJ-2039 三角形

Problem Description 给定三条边,请你判断一下能不能组成一个三角形。 Input 输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C。其中A,B,C <1000; Output 对于每个测试实例,如果三条边长A,B,C能组成三角形的话,输出YES,否则NO。 Sample Input 2 1 2

2017-07-28 21:15:53 170

原创 HDOJ-2010 水仙花数

Problem Description 春天是鲜花的季节,水仙花就是其中最迷人的代表,数学上有个水仙花数,他是这样定义的: “水仙花数”是指一个三位数,它的各位数字的立方和等于其本身,比如:153=13+53+33153=1^3+5^3+3^3。 现在要求输出所有在m和n范围内的水仙花数。 Input 输入数据有多组,每组占一行,包括两个整数m和n(100<=m<=

2017-07-28 20:38:52 223

原创 1006.Funny Function

Problem Description Function Fx,yF_{x,y}satisfies: F1,1=F1,2=1F_{1,1}=F_{1,2}=1 F1,i=F1,i−1+2∗F1,i−2(i>=3)F_{1,i}=F_{1,i-1}+2*F_{1,i-2} (i>=3) Fi,j=∑j+N−

2017-07-28 11:27:57 218

原创 1003.Maximum Sequence

Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Steph is extremely obsessed with “sequence problems” that are usually seen on magazines: Give

2017-07-28 11:03:40 162

原创 HDOJ-1004 Let the Balloon Rise

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secr

2017-07-27 23:12:26 192

原创 1001.Is Derek lying?

Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Derek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.This summer holiday,t

2017-07-27 21:20:45 271

原创 HDOJ-1003 Max Sum

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Given a sequence a[1],a[2],a[3]……a[n], your job is to calculate the max sum of a sub-sequence

2017-07-26 23:22:14 220

原创 HDOJ-1002 A + B Problem II

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate th

2017-07-26 21:26:10 183

原创 HDOJ-1001 Sum Problem

Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n. Input The input will consist of a

2017-07-26 16:58:53 230

原创 1002.Balala Power!

Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072K(Java/Others) Problem Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge t

2017-07-26 14:27:08 198

原创 1011.KazaQ's Socks

Problem Description KazaQ wears socks everyday. At the beginning, he has n pairs of socks numbered from 1 to n in his closets. Every morning, he puts on a pair of socks which has the smal

2017-07-25 23:02:08 157

原创 1001.Add More Zero

Problem Description There is a youngster known for amateur propositions concerning several mathematical hard problems. Nowadays, he is preparing a thought-provoking problem on a specific type o

2017-07-25 22:45:35 227

原创 F-POJ-3414 Pots

Description You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap; DROP

2017-07-24 20:37:10 208

原创 E-POJ-3087 Shuffle'm Up

POJ-3087 Description A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each

2017-07-24 20:35:03 230

原创 D-POJ-3126 Prime Path

Description The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It

2017-07-24 20:27:32 223

原创 C-POJ-1426 Find The Multiple

Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater tha

2017-07-24 20:23:17 170

原创 B-POJ-3278 Catch That Cow

Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K

2017-07-24 20:15:59 190

原创 A-POJ-1321 棋盘问题

POJ-1321 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n、k,用一个空格隔开,表示了将在一个n*n的矩阵内描

2017-07-24 16:46:44 340

空空如也

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

TA关注的人

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