
难
文章平均质量分 78
枫流仁武
这个作者很懒,什么都没留下…
展开
-
PAT 1096 Consecutive Factors
注意本题的判断条件#include <iostream>#include <vector>#include <cmath>#include <set>#include <climits>using namespace std;typedef long long LL;void find(LL N,vector<L...原创 2019-07-13 16:47:01 · 82 阅读 · 0 评论 -
1056 Mice and Rice
这道题值得反复思考!本题代码参考了网上大神的,自己写的远比这复杂的多...使用队列,通过计数实现了分层操作,每一层淘汰的老鼠rank相等#include <iostream>#include <vector>#include <queue>#include <algorithm>using namespace std;stru...原创 2019-07-10 09:29:04 · 142 阅读 · 0 评论 -
PAT 1073 Scientific Notation
这题太恶心了,不想再做第二遍#include <iostream>#include <cmath>using namespace std;int main() { string s; cin>>s; int index=s.find('E'); string t=s.substr(1,index-1); in...原创 2019-07-14 13:18:39 · 84 阅读 · 0 评论 -
PAT 1135 Is It A Red-Black Tree
There is a kind of balanced binary search tree namedred-black treein the data structure. It has the following 5 properties:(1) Every node is either red or black. (2) The root is black. (3) Every...原创 2019-08-31 16:32:17 · 146 阅读 · 0 评论 -
PAT 1030 Travel Plan
题目:A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest p...原创 2019-08-10 16:32:01 · 91 阅读 · 0 评论 -
PAT 1087 All Roads Lead to Rome
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.Input Specification:Each ...原创 2019-08-26 18:55:41 · 116 阅读 · 0 评论 -
PAT 1010 Radix
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive inte...原创 2019-09-06 12:12:44 · 87 阅读 · 0 评论