- 博客(42)
- 收藏
- 关注
原创 知识点梳理
了解 Kafka、Elasticsearch 的使用,熟悉 Kafka 基本结构、消费者组、备份机制的原理,熟悉 Elasticsearch 倒排。– 熟练使用 Spring Cloud、Spring Boot、MyBatis 等常用框架,熟悉 Spring IOC、AOP 原理。– 熟练掌握 Java,熟悉多线程、集合框架、jvm 等相关知识。– 熟练使用 MySQL,熟悉 MySQL 索引、事务、锁机制、日志系统、数据备份与恢复。– 熟练使用 Pigeon、Thrift 等 Rpc 框架。
2023-04-18 21:48:02 613
原创 面试准备基础知识
HashMap和TreeMap有什么区别?Mysql采用B+树当索引的原因是什么?二叉搜索树、平衡树、红黑树区别是什么?那TreeMap底层是什么数据结构?你能说一下JAVA有哪些集合吗?跳表的时间查询复杂度是多少?为什么B+树可以顺序查找?Mysql索引有哪些索引?
2023-04-02 18:04:47 393
原创 poj1159
dp。#include<iostream>#include<string>#include<algorithm>using namespace std;int N;string a, b;int dp[2][5006];int main(){ cin >> N; cin >> a; b = a; reverse(b.begin(), b.end()); for(int i = 1; i &l
2020-08-29 12:08:45 106
原创 poj1080
dp。#include<iostream>#include<string>#include<algorithm>using namespace std;const int inf = 1e9;int T;int n, n2;string a, b;int s[89][89];int dp[105][105];int main(){ s['A']['A'] = 5, s['A']['C'] = -1, s['A']['G'] = -2, s[
2020-08-28 12:09:53 99
原创 poj1163
dp。#include<iostream>#include<algorithm>using namespace std;int N;int a[105][105];int dp[105][105];int main(){ cin >> N; for(int i = 0; i < N; i ++) for(int j = 0; j <= i; j ++) cin >> a[i][
2020-08-28 10:48:25 115
原创 poj3176
dp。#include<iostream>#include<algorithm>using namespace std;int N;int a[355][355];int dp[355][355];int main(){ cin >> N; for(int i = 0; i < N; i ++) for(int j = 0; j <= i; j ++) cin >> a[i][
2020-08-27 17:09:38 90
原创 poj2533
dp。#include<iostream>#include<algorithm>using namespace std;int N;int a[1005];int dp[1005];int main(){ fill(dp, dp + 1005, 1); cin >> N; for(int i = 0; i < N; i ++) cin >> a[i]; for(int i = 1; i &l
2020-08-27 13:27:30 101
原创 poj1260
dp。#include<iostream>#include<algorithm>using namespace std;const int inf = 1e9;int ca;int c;int a[105], p[105];int sum[106];int dp[106];int main(){ cin >> ca; while(ca --) { fill(dp, dp + 106, inf);
2020-08-27 12:50:22 79
原创 poj3267
dp。#include<iostream>#include<string>using namespace std;int W, L;string m;string d[605];int dp[306];int main(){ cin >> W >> L; cin >> m; for(int i = 0; i < W; i ++) cin >> d[i]; int k
2020-08-27 11:31:17 84
原创 poj1014
dp。#include<iostream>#include<cstring>using namespace std;int c = 1;int n[6], v[6] = {1, 2, 3, 4, 5, 6};bool dp[60005];int main(){ int sum; while(cin >> n[0] >> n[1] >> n[2] >> n[3] >> n[4] >>
2020-08-26 17:58:47 90
原创 poj1837
dp。#include<iostream>using namespace std;int C, G;int a[25], b[25];int dp[25][150005];int main(){ cin >> C >> G; for(int i = 0; i < C; i ++) cin >> a[i]; for(int i = 1; i <= G; i ++) cin >
2020-08-26 12:54:47 77
原创 poj2251
bfs。#include<iostream>#include<string>#include<queue>#include<cstring>using namespace std;const int dz[6] = {0, 0, 0, 0, 1, -1};const int dx[6] = {0, 1, 0, -1, 0, 0};const int dy[6] = {1, 0, -1, 0, 0, 0};int L, R, C;string
2020-08-25 16:10:21 74
原创 poj3414
bfs。#include<iostream>#include<queue>#include<string>using namespace std;int A, B, C;struct Node{ int a, b, s; string op; Node(){} Node(int a, int b, int s, string op) { this->a = a; this-&g
2020-08-25 12:38:49 95
原创 poj3126
bfs。#include<iostream>#include<queue>#include<cstring>#include<algorithm>#include<cmath>using namespace std;int c;int a, b;bool flag[100005];struct Node{ int a, s; Node(){} Node(int a, int s) {
2020-08-24 17:15:46 143
原创 poj1426
bfs。#include<iostream>#include<queue>using namespace std;int n;void bfs(){ queue<long long> q; q.push(1); long long u; while(q.size()) { u = q.front(); q.pop(); if(u % n == 0) {
2020-08-24 13:13:23 139
原创 poj3278
bfs。#include<iostream>#include<queue>using namespace std;int N, K;struct Node{ int i, s; Node(){} Node(int i, int s) { this->i = i; this->s = s; }};bool vis[2000005];int bfs(){ queue<
2020-08-24 12:01:15 93
原创 poj1321
dfs。#include<iostream>#include<string>#include<cstring>using namespace std;int n, k;string m[13];bool vis[13];int cnt;void dfs(int i, int j){ if(i == n && j) return; if(i == n && !j) {
2020-08-23 18:13:28 88
原创 poj2488
dfs。#include<iostream>#include<cstring>using namespace std;const int dx[8] = {-1, 1, -2, 2, -2, 2, -1, 1};const int dy[8] = {-2, -2, -1, -1, 1, 1, 2, 2};int n;int c = 1;int p, q;bool vis[31][31];int cnt;int path[31 * 31][2];bool fla
2020-08-22 16:22:15 75
原创 poj3253
哈夫曼树。#include<iostream>#include<queue>using namespace std;int N;priority_queue<int, vector<int>, greater<int>> q;long long res;int main(){ cin >> N; int a; while(N --) { cin >> a;
2020-08-19 17:59:33 150
原创 poj3026
prim。#include<iostream>#include<string>#include<cstring>#include<algorithm>#include<queue>using namespace std;const int inf = 1e9;int N;int x, y;string a[55];int b[55][55];int cnt;struct Node{ int x, y, step;
2020-08-19 12:59:18 73
原创 poj1258
prim。#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int inf = 1e9;int N;int e[105][105];int d[105];bool vis[105];int res;void prim(){ memset(vis, false, sizeof(vis)); for(int i = 0; i <
2020-08-18 16:45:30 88
原创 poj2485
prim。#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int inf = 1e9;int T;int N;int e[505][505];int d[505];bool vis[505];int res;void prim(){ memset(vis, false, sizeof(vis)); for(int i = 0;
2020-08-18 16:32:00 106
原创 poj1789
prim。#include<iostream>#include<string>#include<cstring>using namespace std;const int inf = 1e9;int n;string a[2005];int e[2005][2005];int d[2005];bool vis[2005];int res;void prim(){ memset(vis, false, sizeof(vis)); f
2020-08-18 13:06:33 70
原创 poj2240
spfa。#include<iostream>#include<string>#include<map>#include<algorithm>#include<cstring>#include<queue>using namespace std;int ca;int n, m;map<string, int> ma;struct Node{ int v, nxt; double t;
2020-08-18 12:10:40 79
原创 poj1125
floyd。#include<iostream>#include<algorithm>using namespace std;const int inf = 1e9;int n, m;int v, t;int e[105][105];int tmp[105];int main(){ while(cin >> n && n) { fill(e[0], e[0] + 105 * 105, inf);
2020-07-24 12:26:17 67
原创 poj2253
spfa。#include<iostream>#include<cmath>#include<cstring>#include<algorithm>#include<queue>using namespace std;const int inf = 1e9;int T = 1;int n;float x[205], y[205];struct Edge{ int v, next; float t;} e[3
2020-07-24 11:05:02 140 1
原创 poj1062
需要加一个0号顶点,连到所有顶点上,这样才能把所有的权重放在边上。面对这种限制,只需要枚举所有的情况,然后求解就行。然后就是spfa。#include<iostream>#include <cstring>#include <queue>using namespace std;const int inf = 1e9;int M, N;int P, L[105], X;int T, V;struct Edge{ int v, next;
2020-07-21 17:57:57 70
原创 poj3295
spfa。#include<iostream>#include<cstring>#include<queue>using namespace std;const int inf = 1e9;int F;int N, M, W;int S, E, T;struct Edge{ int v, next; int t;} e[5205];int head[505], Count;int d[505];int n[505];bool
2020-07-21 16:14:17 76
原创 poj1860
spfa。#include<iostream>#include <cstring>#include <queue>using namespace std;int N, M, S;double V;int A, B;double RAB, CAB, RBA, CBA;struct Edge{ int v, next; double r, c;} e[205];int head[205], Count;double d[205];i
2020-07-21 12:35:16 83
原创 poj2255
前序遍历+中序遍历转后序遍历。#include<iostream>#include<string>using namespace std;string s1, s2;void build(int n, string s1, string s2){ if(n <= 0) return; int tmp = s2.find(s1[0]); build(tmp, s1.substr(1, tmp), s2.substr(0, tmp
2020-07-21 11:08:22 76
原创 poj3087
模拟。#include<iostream>#include<string>using namespace std;int N;int C;string S1, S2, target;int main(){ cin >> N; for(int i = 1; i <= N; i ++) { cin >> C >> S1 >> S2 >> target;
2020-07-20 16:57:09 60
原创 poj1537
模拟。#include<iostream>#include<cstring>using namespace std;int n, m, x;char map[15][15];int path[15][15];int count;int main(){ while(cin >> n >> m >> x) { memset(path, 0, sizeof(path)); count =
2020-07-20 12:26:44 71
原创 poj2632
模拟。#include<iostream>using namespace std;int K;int A, B;int N, M;int x[105];int y[105];int dir[105];int main(){ scanf("%d", &K); while(K != 0) { K --; scanf("%d%d%d%d", &A, &B, &N, &M);
2020-07-15 19:31:31 62
原创 poj1068
模拟。#include<iostream>#include<string>using namespace std;int t;int n;int P[25];int W[25];string s;int main(){ scanf("%d", &t); for(int i = 0; i < t; i ++) { s = ""; scanf("%d", &n); for(i
2020-07-15 16:01:45 69
原创 poj1008
模拟。#include<iostream>#include<string>using namespace std;int n;int main(){ scanf("%d", &n); printf("%d\n", n); for(int i = 0; i < n; i ++) { int a; char tmp; string b; int c;
2020-07-15 12:09:48 76
原创 poj3239
构造法。// https://www.cnblogs.com/rainydays/archive/2011/07/12/2104336.html#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int n;int main(){//freopen("t.txt", "r", stdin);while
2020-07-14 17:44:47 2344
原创 poj3295
递归。// https://www.cnblogs.com/shenben/p/5646335.html#include<iostream>using namespace std;int cnt;char str[101];bool step(char str[101],int tk){ cnt++; switch(str[cnt]){ case 'p':return tk&1; case 'q':return(tk>&
2020-07-14 16:39:59 151
原创 poj2586
本题最关键的是读懂题目。#include<iostream>using namespace std;int s, d;bool flag;int result;int main(){ while(scanf("%d%d", &s, &d) != EOF) { flag = false; if(10 * s - 2 * d > 0 && 4 * s - d < 0) {
2020-07-14 12:18:47 72
原创 poj1328
本质是区间选点,通过求区间,转化为区间选点。#include<iostream>#include<algorithm>#include<cmath>using namespace std;int n, d;double a[1005][2];double b[1005][2];int result;bool compare(double* a, double* b){ return a[0] < b[0];}int main(){
2020-07-13 17:50:01 75
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人