01 2022 档案

摘要:class Solution { public: static bool cmp(pair<char,int> a, pair<char,int> b){ return a.second>b.second; } string frequencySort(string s) { string ans= 阅读全文
posted @ 2022-01-30 15:32 wydxry 阅读(377) 评论(0) 推荐(0) 编辑
摘要:Go语言实现RPC编程 上节课我们对RPC知识做了介绍,讲解了RPC的原理,通过图示方式讲解了RPC的内部执行过程。本节课,我们继续来学习RPC相关的内容。 RPC官方库 在Go语言官方网站的pkg说明中,提供了官方支持的rpc包,具体链接如下:https://golang.org/pkg/net/ 阅读全文
posted @ 2022-01-29 09:45 wydxry 阅读(169) 评论(0) 推荐(0) 编辑
摘要:RPC简介及原理介绍 背景 框架主要包括两个:gRPC框架、go-micro框架。 首先来学习gRPC框架相关的内容。 本地过程调用 让我们先来看看正常情况下程序的执行和调用情况。例如有如下go语言代码: func main() { var a, b int a = 1 b = 2 c := Add 阅读全文
posted @ 2022-01-27 18:13 wydxry 阅读(764) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.acwing.com/problem/content/831/ 数组模拟队列 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+10; 4 int a[N]; 5 int h=0, 阅读全文
posted @ 2022-01-12 09:24 wydxry 阅读(57) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.acwing.com/problem/content/830/ 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+5; 4 int a[N]; 5 int main() 6 { 7 阅读全文
posted @ 2022-01-12 09:07 wydxry 阅读(43) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.acwing.com/problem/content/description/804/ 思路: 离散化实质是一种映射 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N=3e5+10; 4 阅读全文
posted @ 2022-01-11 23:25 wydxry 阅读(52) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.acwing.com/problem/content/805/ 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef pair<int,int> PII; 4 vector<PII> vec,ans; 阅读全文
posted @ 2022-01-11 22:59 wydxry 阅读(49) 评论(0) 推荐(0) 编辑
摘要:一维 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+5; 4 int n,m,l,r,c; 5 int a[N],d[N]; 6 int main() 7 { 8 cin>>n>>m; 9 for(int i=0 阅读全文
posted @ 2022-01-10 23:59 wydxry 阅读(55) 评论(0) 推荐(0) 编辑

Live2D