PAT
qq_25185969
这个作者很懒,什么都没留下…
展开
-
PAT 1083 List Grades
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <queue>#include <set>#include <algorithm>using namespace std;class GradeRecord .原创 2021-01-28 18:27:54 · 126 阅读 · 0 评论 -
PAT 1080 Graduate Admission
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <queue>#include <set>#include <algorithm>using namespace std;class Applicant {.原创 2021-01-27 11:44:49 · 78 阅读 · 0 评论 -
PAT 1028 List Sorting
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <queue>#include <algorithm>using namespace std;class Student {public: string id; .原创 2021-01-26 21:19:27 · 111 阅读 · 0 评论 -
PAT 1075 PAT Judge
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <queue>#include <set>#include <algorithm>using namespace std;class Submit {pub.原创 2021-01-26 21:17:45 · 91 阅读 · 0 评论 -
PAT 1055 The World‘s Richest
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <queue>#include <algorithm>using namespace std;class Richer {public: string name; .原创 2021-01-26 19:41:11 · 104 阅读 · 0 评论 -
PAT 1025 PAT Ranking
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <queue>#include <algorithm>using namespace std;class Testee {public: string id; i.原创 2021-01-26 17:03:18 · 123 阅读 · 0 评论 -
PAT 1046 Shortest Distance
#include <cstdio>#include <cmath>#include <vector>using namespace std;void swap(int& a, int& b) { int t = a; a = b; b = t;}int main() { int count; scanf("%d", &count); int totalDistance = 0; vector<.原创 2021-01-24 21:37:38 · 73 阅读 · 0 评论 -
PAT 1058 A+B in Hogwarts
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>using namespace std;int main() { int galleon1, galleon2, sickle1, sickle2, knut1, knut2; scanf("%d.%d.%d %d.%d.%d", &gall.原创 2021-01-24 21:36:39 · 65 阅读 · 0 评论 -
PAT 1065 A+B and C (64bit)
#include <cstdio>using namespace std;int main() { int n; scanf("%d", &n); for(int i = 0; i < n; i++) { long long a, b, c; scanf("%lld %lld %lld", &a, &b, &c); long long sum = a + b; if.原创 2021-01-24 21:35:41 · 103 阅读 · 0 评论 -
PAT 1062 Talent and Virtue
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <algorithm>using namespace std;class People {public: int id; int virtue; int talent; .原创 2021-01-24 21:35:05 · 94 阅读 · 0 评论 -
PAT 1016 Phone Bills
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <algorithm>using namespace std;#define OFFLINE 0#define ONLINE 1class Record {public: s.原创 2021-01-24 21:32:12 · 124 阅读 · 0 评论 -
PAT甲级 刷题索引 按《算法笔记》顺序排列
三 入门篇-入门模拟3.1 简单模拟1042 Shuffling Machine1046 Shortest Distance3.2 查找元素3.3 图形输出3.5 进制转换四 入门篇-算法初步4.1 排序4.2 散列4.3 递归4.4 贪心4.5 二分4.6 双指针4.7 其他五 入门篇-数学问题...原创 2021-01-24 21:36:19 · 615 阅读 · 0 评论 -
PAT 1042 Shuffling Machine
#include <cstdio>#include <cmath>int main() { int count; int start[54], end[54], shuffleOrder[54]; scanf("%d", &count); for (int i = 0; i < 54; i++) { scanf("%d", &shuffleOrder[i]); end[i] = i; } while (coun.原创 2021-01-24 21:37:23 · 147 阅读 · 0 评论 -
PAT 1036 Boys vs Girls
#include <cstdio>#include <cmath>#include <vector>#include <climits>#include <iostream>using namespace std;int main() { int n; scanf("%d", &n); string boyName, boyID, girlName, girlID; int low4boy = INT_.原创 2021-01-23 13:10:08 · 101 阅读 · 0 评论 -
PAT 1031 Hello World for U
#include <cstdio>#include <iostream>using namespace std;int main() { string str; cin >> str; int N = str.length(); int rownum = (N + 2) / 3; int colnum = N + 2 - 2 * rownum; for (int row = 0; row < rownum; row++) {.原创 2021-01-23 13:09:12 · 77 阅读 · 0 评论 -
PAT 1027 Colors in Mars
#include <cstdio>#include <cmath>#include <vector>#include <climits>#include <iostream>using namespace std;string radixTransfer(int N, int b, string code) { string radix; while (N != 0) { radix = code.at(N % b.原创 2021-01-23 13:06:43 · 63 阅读 · 0 评论 -
PAT 1019 General Palindromic Number
#include <cstdio>#include <cmath>#include <vector>#include <climits>#include <iostream>using namespace std;int main() { int N, b; cin >> N >> b; vector<int> numbers; while (N != 0) { nu.原创 2021-01-23 13:05:58 · 99 阅读 · 0 评论 -
PAT 1012 The Best Rank
#include <cmath>#include <vector>#include <climits>#include <iostream>#include <string>#include <map>#include <algorithm>using namespace std;class Grade {public: string ID; int course[4]; int rank.原创 2021-01-23 13:05:13 · 105 阅读 · 1 评论 -
PAT 1011 World Cup Betting
#include <cstdio>#include <cmath>#include <vector>#include <climits>using namespace std;int main() { double maxProfit[3]; double oddW, oddT, oddL; for (int i = 0; i < 3; i++) { scanf("%lf %lf %lf", &oddW, .原创 2021-01-23 13:04:00 · 101 阅读 · 0 评论 -
PAT 1009 Product of Polynomials
#include <cstdio>#include <cmath>#include <vector>#include <climits>using namespace std;void swap(int& a, int& b) { int t = a; a = b; b = t;}int main() { const int MAX_POLY_TERMS_NUM = 1001, MAX_ANS_TERMS_.原创 2021-01-23 13:03:13 · 72 阅读 · 0 评论 -
PAT 1006 Sign In and Sign Out
#include <cstdio>#include <cmath>#include <vector>#include <climits>#include <iostream>using namespace std;int main() { int n; scanf("%d", &n); string signIn, signOut, temp; int signInTime = INT_MAX, sig.原创 2021-01-23 13:02:12 · 72 阅读 · 0 评论 -
PAT 1002 1002 A+B for Polynomials
#include <cstdio>#include <cmath>#include <vector>#include <climits>using namespace std;void swap(int& a, int& b) { int t = a; a = b; b = t;}int main() { double poly[1001] = { 0 }, coefficients; int k, e.原创 2021-01-23 13:00:10 · 86 阅读 · 0 评论