2016年12月10日

PTA 5-15 PAT Judge (25分)

摘要: /* * 1.主要就用了个sort对结构体的三级排序 */ #include "iostream" #include "algorithm" using namespace std; int perfectScore[6]; struct Node { int id; int score[6] = {-2,-2,-2,-2,-2,-2}; /* 记录每一题的分数 初始化为-2... 阅读全文

posted @ 2016-12-10 23:24 于无声出听惊雷 阅读(377) 评论(0) 推荐(0) 编辑

5-13 统计工龄 (20分)

摘要: 给定公司NN名员工的工龄,要求按工龄增序输出每个工龄段有多少员工。 输入格式: 输入首先给出正整数NN(\le 10^5≤10​5​​),即员工总人数;随后给出NN个整数,即每个员工的工龄,范围在[0, 50]。 输出格式: 按工龄的递增顺序输出每个工龄的员工个数,格式为:“工龄:人数”。每项占一行 阅读全文

posted @ 2016-12-10 10:39 于无声出听惊雷 阅读(993) 评论(0) 推荐(0) 编辑

1098. Insertion or Heap Sort (25)

摘要: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文

posted @ 2016-12-10 10:09 于无声出听惊雷 阅读(218) 评论(0) 推荐(0) 编辑

PAT 1089. Insert or Merge (25)

摘要: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文

posted @ 2016-12-10 00:48 于无声出听惊雷 阅读(1159) 评论(0) 推荐(0) 编辑

导航