- 博客(6)
- 收藏
- 关注
原创 【PAT甲级-1095】题解
#include<iostream> #include<algorithm> #include<cstring> #include<map> using namespace std; struct record { char id[10]; int hh, mm, ss, time; char status[4]; }rec[4000001], valid[4000001]; bool cmp(record a, record b).
2022-03-09 21:26:15
120
原创 【PAT甲级-1080】题解
#include<iostream> #include<algorithm> using namespace std; struct student { int ge, gi, grade; int choices[6], rank, id; }app[100001]; struct school { int quota, stunum, id[40010], lastAdmit; }sch[110]; bool cmp1(student a, stu.
2022-03-08 20:21:25
81
原创 【PAT甲级-1075】题解
#include<iostream> #include<cstring> #include<algorithm> using namespace std; struct student { int id, grade[6], total, rank; int num; bool flag; }stu[1000001]; bool cmp(student a, student b) { if(a.total != b.total) retu.
2022-03-07 19:02:03
66
原创 【PAT甲级-1082】题解
#include<iostream> #include<cstring> using namespace std; char upper[6][6] = {"Shi", "Bai", "Qian", "Wan", "Yi"}; char common[11][6] = {"ling", "yi", "er", "san", "si", "wu", "liu", "qi", "ba", "jiu"}; int main() { string str; cin >.
2022-03-06 20:36:33
151
原创 【PAT甲级-1055】题解
#include<iostream> #include<cstring> #include<algorithm> using namespace std; struct person { char name[9]; int age, worth; }per[100001]; bool cmp(person a, person b) { if(a.worth != b.worth) return a.worth >= b.worth; .
2022-03-06 20:33:38
134
原创 《算法笔记》1928-日期相减
学习笔记,仅供参考。 #include<iostream> using namespace std; int months[13][2] = {{0, 0}, {31, 31}, {28, 29}, {31, 31}, {30, 30}, {31, 31}, {30, 30}, {31, 31}, {31, 31}, {30, 30}, {31, 31}, {30, 30}, {31, 31}}; bool isleap(int y){ return (y % 4 == 0 &&a
2021-05-12 23:18:03
74
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人