自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [PAT] 1006 Sign In and Sign Out (25)

题意: Sample Input: 3 CS301111 15:30:28 17:00:10 SC3021234 08:00:00 11:25:25 CS301133 21:45:00 21:58:40 Sample Output: SC3021234 CS301133 样例有三个人,id是第一列,后面两列是最早时间和最晚时间,输出最早来的人和最晚走的人#in

2017-10-22 15:53:40 191

原创 [PAT] 1005 Spell It Right (20)

题意是给你几个数,让你输出他们求和后的每个数的英文,如12345输出 one five//已AC代码 #include<bits/stdc++.h> using namespace std; stack<int> s; int main() { string b[10]={"zero","one","two","three","four","five","six","seven","eigh

2017-10-22 15:50:23 151

原创 [PAT] 1001 A+B Format (20)

题意是求给出两个数的和,按三位一个逗号的格式输出//已AC代码 #include<bits/stdc++.h> using namespace std;int main() { int a,b; while(~scanf("%d%d",&a,&b)) { int sum; sum=a+b; if(sum<0) {

2017-10-22 15:48:12 150

原创 [Floyd] codevs1077 - 多源最短路

题目描述 Description 已知n个点(n<=100),给你n*n的方阵,a[i,j]表示从第i个点到第j个点的直接距离。 现在有Q个询问,每个询问两个正整数,a和b,让你求a到b之间的最短路程。 满足a[i,j]=a[j,i]; 输入描述 Input Description 第一行一个正整数n,接下来n行每行n个正整数,满足a[i,i]=0,再一行一个Q,接

2017-10-22 15:43:16 214

原创 [DFS] NYOJ - 325 zb的生日

zb的生日 时间限制:3000 ms | 内存限制:65535 KB 难度:2 描述 今天是阴历七月初五,acm队员zb的生日。zb正在和C小加、never在武汉集训。他想给这两位兄弟买点什么庆祝生日,经过调查,zb发现C小加和never都很喜欢吃西瓜,而且一吃就是一堆的那种,zb立刻下定决心买了一堆西瓜。当他准备把西瓜送给C小加和never的时候,遇到了一个难题,n

2017-09-10 14:01:22 186

原创 [DP] POJ - 3624 Charm Bracelet

Charm Bracelet Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41212 Accepted: 17929 Description Bessie has gone to the mall’s jewelry store and spies a charm bra

2017-09-09 19:43:29 159

原创 [DP] POJ - 1163 The Triangle

The Triangle Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 51206 Accepted: 31010 Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5

2017-09-09 19:33:07 175

原创 [DP] POJ-2533 Longest Ordered Subsequence

Longest Ordered Subsequence Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 55238 Accepted: 24770 Description A numeric sequence of ai is ordered if a1 < a2 < … <

2017-09-09 19:26:23 123

原创 [快速幂] POJ-3641 Pseudoprime numbers

Pseudoprime numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10782 Accepted: 4660 Description Fermat’s theorem states that for any prime number p and for a

2017-09-07 21:06:34 166

原创 [DP] POJ - 1002 487-3279

487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 295341 Accepted: 52901 Description Businesses like to have memorable telephone numbers. One way to make a

2017-09-07 20:57:58 170

原创 [DFS] NYOJ-1058-部分和问题

部分和问题 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述 给定整数a1、a2、…….an,判断是否可以从中选出若干数,使它们的和恰好为K。 输入 首先,n和k,n表示数的个数,k表示数的和。 接着一行n个数。 (1<=n<=20,保证不超int范围) 输出 如果和恰好可以为k,输出“YES”,并按输入顺序

2017-09-06 21:26:40 224

原创 [DFS]NYOJ 927 The partial sum problem

The partial sum problem 时间限制:1000 ms | 内存限制:65535 KB 描述 One day,Tom’s girlfriend give him an array A which contains N integers and asked him:Can you choose some integers from the N integer

2017-09-06 20:07:39 171

原创 [BFS] poj - 3984 迷宫问题

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, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,

2017-09-03 15:46:57 254

原创 [DFS] HOJ 1797 Red and Black

Problem Description 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 can move to one of four adjac

2017-09-03 15:41:58 205

原创 [贪心]codeforces - 651A Joysticks

Problem Description Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at a1 percent and second one is charged at a2 percent.

2017-09-03 15:30:16 193

空空如也

空空如也

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

TA关注的人

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