Myh4ck1ife

争取不被吊打de小淘气


  • 首页

  • 分类

  • 标签

  • 归档

  • 关于

  • menu.赞助作者

九度oj-1012

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?
阅读全文 »

九度oj-1011

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个,例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和为20。现在增加一个要求,即还需要输出该子序列的第一个和最后一个元素。
阅读全文 »

九度oj-1010

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

读入两个小于100的正整数A和B,计算A+B.
需要注意的是:A和B的每一位数字由对应的英文单词给出.
阅读全文 »

九度oj-1009

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

判断两序列是否为同一二叉搜索树序列
阅读全文 »

九度oj-1008

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。
阅读全文 »

九度oj-1007

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

按要求,给国家进行排名。
阅读全文 »

九度oj-1006

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

对给定的字符串(只包含'z','o','j'三种字符),判断他是否能AC。

是否AC的规则如下:
1. zoj能AC;
2. 若字符串形式为xzojx,则也能AC,其中x可以是N个'o' 或者为空;
3. 若azbjc 能AC,则azbojac也能AC,其中a,b,c为N个'o'或者为空;
阅读全文 »

九度oj-1005

发表于 2017-03-15   |   分类于 九度oj   |  

题目描述:

It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure.
Each applicant will have to provide two grades: the national entrance exam grade GE, and the interview grade GI. The final grade of an applicant is (GE + GI) / 2. The admission rules are:

• The applicants are ranked according to their final grades, and will be admitted one by one from the top of the rank list.
• If there is a tied final grade, the applicants will be ranked according to their national entrance exam grade GE. If still tied, their ranks must be the same.
• Each applicant may have K choices and the admission will be done according to his/her choices: if according to the rank list, it is one's turn to be admitted; and if the quota of one's most preferred shcool is not exceeded, then one will be admitted to this school, or one's other choices will be considered one by one in order. If one gets rejected by all of preferred schools, then this unfortunate applicant will be rejected.
• If there is a tied rank, and if the corresponding applicants are applying to the same school, then that school must admit all the applicants with the same rank, even if its quota will be exceeded.
阅读全文 »

九度oj-1004

发表于 2017-03-13   |   分类于 九度oj   |  

题目描述:

Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The median of two sequences is defined to be the median of the non-decreasing sequence which contains all the elements of both sequences. For example, the median of S1 and S2 is 13.
Given two increasing sequences of integers, you are asked to find their median.
阅读全文 »

九度oj-1003

发表于 2017-03-13   |   分类于 九度oj   |  

题目描述:

给定两个整数A和B,其表示形式是:从个位开始,每三位数用逗号","隔开。
现在请计算A+B的结果,并以正常形式输出。
阅读全文 »
1…101112…14
Myh4ck1ife

Myh4ck1ife

学习总结 思考感悟 知识管理

132 日志
10 分类
31 标签
© 2017 Myh4ck1ife
由 Hexo 强力驱动
主题 - NexT.Mist