- 博客(62)
- 收藏
- 关注
原创 酷安开发者 无法解析上传的APK文件,请重新上传
最近酷安更新应用,一直显示这个。后来发现是app_name这个字符串必须要和酷安商店的一模一样,大小写空格都一样才行。
2023-04-24 18:55:19
246
原创 linux安装无线网卡,ubuntu20.04.5安装无线网卡 WDN6200
linux安装无线网卡,ubuntu20.04.5安装无线网卡
2023-02-28 12:41:59
602
1
原创 手动将最新下载的视频更新在MediaStore中, 手动刷新 Android 的 MediaStore。三行代码手动更新MediaStore
三行代码手动更新MediaStore
2023-02-01 16:43:14
316
原创 getContentResolver().query()如何不获取子目录内容
getContentResolver().query()如何不获取子目录内容
2022-11-13 18:42:33
407
原创 1004 Counting Leaves c++
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts with a line containing 0
2022-06-04 12:08:09
96
原创 1167 Cartesian Tree c++
A Cartesian tree is a binary tree constructed from a sequence of distinct numbers. The tree is heap-ordered, and an inorder traversal returns the original sequence. For example, given the sequence { 8, 15, 3, 4, 1, 5, 12, 10, 18, 6 }, the min-heap Cartesia
2022-06-04 12:07:18
96
原创 1167 Cartesian Tree c++
A Cartesian tree is a binary tree constructed from a sequence of distinct numbers. The tree is heap-ordered, and an inorder traversal returns the original sequence. For example, given the sequence { 8, 15, 3, 4, 1, 5, 12, 10, 18, 6 }, the min-heap Cartesia
2022-06-03 18:22:08
97
原创 1166 Summit c++
A summit (峰会) is a meeting of heads of state or government. Arranging the rest areas for the summit is not a simple job. The ideal arrangement of one area is to invite those heads so that everyone is a direct friend of everyone.Now given a set of tentative
2022-06-03 17:09:24
105
原创 二叉树返回某个特定节点所在深度,从根节点开始算,c++实现
//root-传入的二叉树根节点 data---要查找的节点值 depth--该节点深度int get_depth(node*root,int data,int depth){ if(root==NULL)return -1; if(root->data==data) return depth; if(get_depth(root->left,data,depth+1)!=-1) return get_depth(root->
2022-05-15 09:48:29
492
原创 二叉树查找特定节点的父节点,c++实现
node *findparent(node*root,int data){ if(root==NULL)return NULL; if(root->left!=NULL&&root->left->data==data) return root; if(root->right!=NULL&&root->right->data==data) return root; if(find
2022-05-15 09:29:14
2012
原创 二叉树根据节点值返回节点,二叉树节点查找 c++
node *findnode(node*root,int data){ if(root==NULL)return NULL; if(root->data==data) return root; if(findnode(root->left,data)!=NULL){ return findnode(root->left,data); } return findnode(root->right,data);}
2022-05-14 23:12:52
509
原创 1130 Infix Expression c++
静态二叉树的构造中序遍历递归#include <bits/stdc++.h>using namespace std;#define maxn 30int n;vector<string>ans;struct node{ string data; int left;int right;}a[maxn];void init(){ cin>>n; for(int i=1;i<=n;i++){ str
2022-05-11 10:45:25
201
原创 1115 Counting Nodes in a BST c++
排二叉树的插入和生成,dfs#include <bits/stdc++.h>using namespace std;struct node{ int data; node *left; node *right;};map<int,int>result;node *creatnode(int data){ node *temp=new node;; temp->data=data; temp->left=NUL
2022-05-10 15:56:43
268
原创 1111 Online Map c++
这奥体就用两次dijkstra算法,两个分开写就行了,两个都是独立的。所以本质上这道题就考的最短路径是否熟练,熟练的话写两次就行了,只是变量太多…#include<bits/stdc++.h>using namespace std;#define maxn 510int n,m;int source,desti;int Length[maxn][maxn];int Time[maxn][maxn];int Lparent[maxn];int Tparent[maxn];vect
2022-05-09 21:28:37
145
原创 1097 Deduplication on a Linked List c++
#include<bits/stdc++.h>using namespace std;struct node{ int address; int key; int next;}a[100001];int main(){ node head;cin>>head.next; int n;cin>>n; for(int i=0;i<n;i++){ node temp; cin>>
2022-05-08 14:55:13
510
原创 1080 Graduate Admission 结构体排序
#include <bits/stdc++.h>using namespace std;struct student{ int id; float Ge; float Gi; float final; int choice[5]; int rank;};struct school{ int capacity; //招生容量 vector<student>accept; //最终录取的学生容器}sch
2022-05-06 20:33:06
148
原创 1037 Magic Coupon 实际很简单的一道题
这道题就是从两个数组中取出数据,相乘能使结果最大。开始感觉还挺难的,稍微想一下就知道这道题其实很轻松,并不用什么贪心算法,直接乘就是了。把每一行给的数据都分成正负两个数组,这样就得到四个数组。然后给每个四个数组都排序以下最后把连个正正相乘,两个负负数组相乘就行了#include <bits/stdc++.h>using namespace std;bool cmp(int a,int b){ return a>b;}int main() { vector&
2022-04-27 20:12:45
161
原创 1022 Digital Library (30 分) c++ map查询
这道题就是一个查询问题,查询问题最好的画当然就用map,有一句话说得很好If you get stuck, try throwing a hashmap at the problem.根本思路就是在输入的时候就建立对应的map_vector,输出直接遍历就行了。比如要查询author对应的书籍有哪些,在输入时候就建立map[author]的一个数组,每次这个anthor出现,在他的数组后面新增对应的书籍id就行了#include <bits/stdc++.h>using names
2022-04-25 18:47:41
66
原创 1016 Phone Bills (25 分) 测试点1,2
测试点1,2应该是如果total费用为0的话,不能输出,包括用户名字和月份都不能输出
2022-04-22 08:59:01
210
原创 1006 Sign In and Sign Out (25 分)
#include <bits/stdc++.h>using namespace std;bool cmp_early(pair<string,vector<string>>a,pair<string,vector<string>>b){ return a.second[0]<b.second[0];}bool cmp_late(pair<string,vector<string>>a,pair<.
2022-04-19 18:04:57
155
原创 1157 Anniversary (25 分) c++
#include <bits/stdc++.h>using namespace std;bool cmp(string a,string b){ return a.substr(6,8)<b.substr(6,8);}int main(){ int n;cin>>n; unordered_map<string,int>a; //存储校友名单 for(int i=0;i<n;i++){ string
2022-04-17 20:02:22
538
原创 1141 PAT Ranking of Institutions (25 分)
#include <bits/stdc++.h>using namespace std;string to_lower(string s){ string temp=""; for(int i=0;i<s.length();i++) temp+= tolower(s[i]); return temp;}class school{public: string schoolName; float scoreSum=0;
2022-04-16 15:28:37
55
原创 1140 Look-and-say Sequence (20 分)
#include <bits/stdc++.h>using namespace std;int main(){ string s;int n; cin>>s>>n; for(int i=0;i<n-1;i++){ string temp=""; for(int j=0;j<s.length();j++){ int count=1; while
2022-04-16 14:14:25
43
原创 1128 N Queens Puzzle (20 分) 思路分析
#include <bits/stdc++.h>using namespace std;bool notTongHang(vector<int>a){ //判断有没有同行的元素 set<int>temp; for(int i=0;i<a.size();i++) temp.insert(a[i]); if(temp.size()==a.size()) return true; else .
2022-04-14 21:27:52
55
原创 1109 Group Photo (25 分) c++思路分析
#include <bits/stdc++.h>using namespace std;class people{public: string name; int height;};bool cmp(people a,people b){ //定义comparator if(a.height==b.height) return a.name<b.name; //如果身高一样,按升序排列 else retu.
2022-04-13 10:01:29
1046
原创 1108 Finding Average (20 分)
#include <bits/stdc++.h>using namespace std;bool isNum(string s){ //判断字符串是否是一个数字 bool flag= true; if(s[0]=='-') s=s.substr(1); for(int i=0;i<s.length();i++){ if((s[i]>='0'&&s[i]<='9')||s[i]=='.') .
2022-04-12 22:40:57
52
原创 1093 Count PAT‘s (25 分) c++ 思路分析,最后两个测试点
Sample Input:APPAPTSample Output:2首先这道题看运行时间限制就知道肯定不能三重循环暴力求解,最后三个测试点直接运行超时。于是想减少一层循环,具体思路是:外层循环循环整个字符串,并记录目前已经访问的‘P’的个数,一旦遇到‘A’,开始进入里层循环,里层循环是找当前‘A’往后到结尾的‘T’的个数。然后子串个数’= 左边‘P’的个数 * 右边‘T’的个数有多少个‘A’,就有多少个 左边‘P’的个数 * 右边‘T’,即可得到答案。但经过测试,还是会超时。。。于是就
2022-04-11 20:24:33
667
原创 1088 Rational Arithmetic (20 分)
Sample Input 1:2/3 -4/2Sample Output 1:2/3 + (-2) = (-1 1/3)2/3 - (-2) = 2 2/32/3 * (-2) = (-1 1/3)2/3 / (-2) = (-1/3)Sample Input 2:5/3 0/6Sample Output 2:1 2/3 + 0 = 1 2/31 2/3 - 0 = 1 2/31 2/3 * 0 = 01 2/3 / 0 = Inf这种题是最不好得分的了,最根本的函数是化
2022-04-11 12:23:40
61
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人