自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

许少y

Codes change the world !

  • 博客(345)
  • 资源 (2)
  • 收藏
  • 关注

原创 PAT--1087. All Roads Lead to Rome

Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.Input Specification:Eac

2018-01-20 20:18:19 612

原创 PAT--1111. Online Map

Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other is the fastest. It is g

2018-01-20 14:52:45 336

原创 hdoj 4109--Instrction Arrangement(topsort)

题解实际上就是按照拓扑序求关键路径。#include <cstdio>#include <queue>#include <vector>#include <cstring>using namespace std;const int maxn = 1000 + 10;int n, m;struct Edge{ int v, w, next;}edge[10010];int head

2017-09-16 17:25:01 422

原创 PAT--1069. The Black Hole of Numbers

For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be obtained by taking

2017-09-07 23:41:31 450

原创 PAT--1079. Total Sales of Supply Chain

A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)– everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on the ch

2017-09-07 22:17:59 451

原创 PAT--1090. Highest Price in Supply Chain(dfs)

A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)– everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on the ch

2017-09-07 17:15:09 286

原创 PAT--1075. PAT Judge

The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to generate the ranklist for PAT.Input Specification:Each input file contain

2017-09-07 15:37:35 290

原创 PAT--1086. Tree Traversals Again

An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stack

2017-09-05 00:18:08 335

原创 PAT--1025. PAT Ranking

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists wi

2017-09-04 00:28:34 278

原创 PAT--1019. General Palindromic Number

A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers.

2017-08-30 23:35:50 301

原创 PAT--1030. Travel Plan(最短路)

A traveler’s map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest path be

2017-08-30 23:17:58 321

原创 PAT--1045. Favorite Color Stripe(LIS)

Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remaining parts

2017-08-09 23:47:48 426

原创 PAT--1083. List Grades

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades a

2017-08-08 23:18:28 321

原创 PAT--1077. Kuchiguse

The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker’s personality. Such a preference is called “

2017-08-07 23:15:50 293

原创 PAT--1068. Find More Coins

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,

2017-07-30 23:13:21 362

原创 PAT--1065. A+B and C (64bit)

Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (<=10). Then T test c

2017-07-28 22:40:57 380

原创 PAT--1064. Complete Binary Search Tree

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node’s key. The right subtr

2017-07-26 23:12:12 309

原创 PAT--1062. Talent and Virtue

About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outstanding in both talent and virtu

2017-07-20 22:52:12 287

原创 PAT--1061. Dating

Sherlock Holmes received a note with some strange strings: “Let’s date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”. It took him only a minute to figure out that those strange strings are ac

2017-07-18 23:21:44 296

原创 PAT--1059. Prime Factors

Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km.Input Specification:Each input file contains one test case which

2017-07-18 22:49:23 216

原创 PAT--1057. Stack

Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the top position) and Pop

2017-07-17 23:34:32 252

原创 PAT--1052. Linked List Sorting

A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now given

2017-07-15 23:05:24 321

原创 PAT--1053. Path of Equal Weight

Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to L is defined to be the sum of the weights of all the nodes along the path from R to

2017-07-12 23:04:22 304

原创 PAT--1055. The World's Richest

Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but concentrate only on the people

2017-07-07 23:00:59 368

原创 PAT--1047. Student List for Course

Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input Specif

2017-07-06 23:43:07 202

原创 PAT--1054. The Dominant Color

Behind the scenes in the computer’s memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the do

2017-07-04 23:18:23 236

原创 PAT--1051. Pop Sequence

Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the

2017-07-03 23:09:15 282

原创 PAT--1049. Counting Ones

The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1’s in

2017-07-01 23:47:49 267

原创 PAT--1050. String Subtraction

Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings. However, it

2017-06-29 22:27:55 269

原创 PAT--1048. Find Coins

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,

2017-06-20 23:50:47 266

原创 PAT--1046. Shortest Distance

The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contains o

2017-06-18 18:33:02 330

原创 PAT--1044. Shopping in Mars

Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M).Whenmakingthepayment,thechaincanbecutatanypositionforonlyonceands

2017-06-17 08:09:14 333

原创 PAT--1041. Be Unique

Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The first one who bets on a

2017-06-08 22:38:18 317

原创 PAT--1040. Longest Symmetric String

Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given “Is PAT&TAP symmetric?”, the longest symmetric sub-string is “s PAT&TAP s”, hence you must

2017-06-07 22:40:29 319

原创 PAT--1039. Course List for Student

hejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes fo

2017-06-06 23:58:37 288

原创 PAT--1038. Recover the Smallest Number

Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recover many numbers such like 32-321-3214-0229-87

2017-06-05 12:58:36 289

原创 hihoCoder--153周 股票价格

描述 小Hi最近在分析一支股票的价格走势,他需要一个程序来辅助分析。这个程序会接收3种消息(指令):价格信息,格式是P timestamp price:表示这支股票在 timestamp 时刻价格是 price。删除价格指令,格式是R timestamp:随着时间推移,小Hi会积累越来越多的价格数据。一些老旧的数据会变得不重要。这个指定会删除 timestamp 以前(包括 timestamp 时

2017-06-05 09:10:16 432

原创 PAT--1037. Magic Coupon

The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that product ba

2017-06-04 22:14:01 232

原创 PAT--1036. Boys vs Girls

This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:Each input file contains one test c

2017-06-04 21:22:43 350

原创 PAT--1035. Password

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L i

2017-06-04 20:46:08 304

mybatis从入门到精通

mybatis从入门到精通 Mybatis使用之环境搭建 Mybatis使用之简单的增删改查 ...

2018-04-16

蓝桥杯2014年C语言真题

2014年的蓝桥杯C语言试题。 1.啤酒和饮料 2.切面条 3.李白打酒 4.史丰收速算 5.打印图形 6.奇怪的分式 7.六角填数 8.蚂蚁感冒 9.地宫取包 10.小朋友排队

2015-02-02

空空如也

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

TA关注的人

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