- 博客(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 163
原创 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 110
原创 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 122
原创 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 145
原创 PAT 甲级 1002
This time, you are supposed to find A+B where A and B are two polynomials.InputEach 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 103
原创 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 104
原创 PAT 1003. 我要通过!(20)
#include#include#includeusing 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 183
原创 PAT 1002. 写出这个数 (20)
#include#include#includeusing 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 127
原创 PAT 1001. 害死人不偿命的(3n+1)猜想 (15)
#includeusing 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 110
原创 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 175
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人