贺巩山的博客

没有伞的孩子更要努力奔跑


  • 首页

  • 文件系统

  • Linux运维

  • 剑指Offer

  • LeetCode题解

  • PAT甲级题解

  • PAT乙级题解

  • CCF CSP题解

  • 分类

  • 标签

  • 归档

  • 书单

  • 关于

  • 搜索

PAT乙级 1033.旧键盘打字 (20 分)

发表于 2019-07-05 | 更新于 2019-07-05 | 分类于 pat乙级
字数统计: 568

旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现。现在给出应该输入的一段文字、以及坏掉的那些键,打出的结果文字会是怎样?

阅读全文 »

PAT乙级 1029.旧键盘/PAT甲级 1084.Broken Keyboard (20 分)

发表于 2019-07-03 | 更新于 2019-07-03 | 分类于 pat乙级 , pat甲级
字数统计: 604

旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现。现在给出应该输入的一段文字、以及实际被输入的文字,请你列出肯定坏掉的那些键。

阅读全文 »

在MacOS中配置MySQL

发表于 2019-07-01 | 更新于 2019-07-03 | 分类于 macos
字数统计: 219

“好记性不如烂笔头。”这里,记录下我在MacOS中安装MySQL的过程。

阅读全文 »

PAT甲级 1080.Graduate Admission (30 分)

发表于 2019-06-30 | 更新于 2019-06-30 | 分类于 pat甲级
字数统计: 1.1k

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 $G_E​$, and the interview grade $G_I​$. The final grade of an applicant is ($G_E​$+$G_I​$)/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 $G_E​$. 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.
阅读全文 »

PAT甲级 1083.List Grades (25 分)

发表于 2019-06-28 | 更新于 2019-06-28 | 分类于 pat甲级
字数统计: 443

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 are in a given interval.

阅读全文 »

PAT甲级 1075.PAT Judge (25 分)

发表于 2019-06-28 | 更新于 2019-06-28 | 分类于 pat甲级
字数统计: 1.3k

The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT.

阅读全文 »

PAT甲级 1055.The World's Richest (25 分)

发表于 2019-06-26 | 更新于 2019-06-26 | 分类于 pat甲级
字数统计: 698

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 in a certain range of ages. That is, given the net worths of Npeople, you must find the M richest people in a given range of their ages.

阅读全文 »

JavaScript访问HTML元素

发表于 2019-06-25 | 更新于 2021-08-05 | 分类于 javascript
字数统计: 584

在JavaScript中,要想访问HTML元素,可以使用下面几种方法。

1
2
3
4
5
document.getElementById(id)
document.getElementsByTagName(tagName)
document.getElementsByClassName(className)
document.querySelector(selector)
document.querySelectorAll(selector)
阅读全文 »

PAT甲级 1028.List Sorting (25 分)

发表于 2019-06-24 | 更新于 2019-06-24 | 分类于 pat甲级
字数统计: 556

Excel can sort records according to any column. Now you are supposed to imitate this function.

阅读全文 »

关于《中国太阳》这篇小说

发表于 2019-06-21 | 更新于 2019-06-21 | 分类于 读书笔记
字数统计: 673

《中国太阳》是刘慈欣发表于2002年的一篇短篇小说,获得了2002年度(第14届)银河奖。

阅读全文 »
1…343536…49
Gongshan He

Gongshan He

490 日志
62 分类
89 标签
GitHub 微博 知乎 Linkedin E-Mail
友情链接
  • 卢明冬的博客
  • lipixun
  • 柳婼 の blog
  • 心灵港
  • Liudeyin
© 2016 — 2023 Gongshan He
访问人数 总访问量 次