- 博客(10)
- 收藏
- 关注
原创 1044 Shopping in Mars
1044 Shopping in Mars (25 分) Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the payment, the cha...
2018-12-31 20:50:45 180
原创 1043 Is It a Binary Search Tree
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes with keys less than the node's key. The right su...
2018-09-04 16:45:03 142
原创 PAT 1032 Sharing (25)
1032 Sharing (25)(25 分) To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share t...
2018-07-24 16:41:31 148
原创 PAT A1016 Phone Bills
1016 Phone Bills (25)(25 分) A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, depending on the time of...
2018-07-21 21:29:30 175
原创 PAT 甲级 1002
This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a po...
2018-02-18 22:10:28 116
原创 PAT 甲级 1001
Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).InputEach input file contains o...
2018-02-18 22:09:33 133
原创 PAT 1003. 我要通过!(20)
#include #include #include using namespace std; int main() { int n = 0; bool flag = false; cin >> n; string a = ""; int pPosition = 0; int tPosition = 0; int nu
2017-12-10 16:42:49 198
原创 PAT 1002. 写出这个数 (20)
#include #include #include using namespace std; string int2pinyin(int n) { switch (n) { case 1:return "yi"; break; case 2:return "er"; break; case 3:ret
2017-12-10 16:41:01 155
原创 PAT 1001. 害死人不偿命的(3n+1)猜想 (15)
#include using namespace std; int main() { int count = 0; int n = 0; cin >> n; while (true) { if (n == 1) break; else {
2017-12-10 16:39:30 117
原创 PAT 1034. 有理数四则运算(20)
#include #include #include #include #include #include #include using namespace std; typedef long long ll; ll a,b,c,d; ll gcd(ll a1,ll a2) { return a2==0? a1:gcd(a2,a1%a2); } v
2017-12-10 16:37:21 208
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人