- 博客(8)
- 收藏
- 关注
原创 进厂打工日记(一)--json格式中数据的提取、explode、split、regexp_replace函数使用
首先,声明使用引擎是spark,经实验regexp_replace在spark和presto中效果不同。仅说明在spark中效果。:从后端获取的数据是JSON格式,需要提取其中的字段,构建数据模型。一个字典格式中包含一个或多个键值对。形如::需要拆分成下表所示的形式首先,使用 regexp_replace() 函数,对JSON格式指定字符删除。
2024-02-19 18:34:52
834
1
原创 受伤的皇后-蓝桥-dfs
受伤的皇后 - 蓝桥云课 (lanqiao.cn)#include <iostream>using namespace std;int n=0,count=0;int grid[10]={0}; //grid[i]=j用来表示:第i行的棋子放在了第j列bool valid(int row, int column){ for(int i = 1; i < row; i++){ //对行遍历,判断i行之前是否有与y冲突的!! if( grid[i] == .
2022-04-05 16:20:11
118
原创 路径-蓝桥21-动态规划
路径 - 蓝桥云课 (lanqiao.cn)#include <bits/stdc++.h>using namespace std;int gcd(int a, int b){ return (!b) ? a : gcd(b, a % b); //求最大公约数}int main(){ int count[2022] = {0}; for(int i = 1; i <= 2021; i++){ for(int j = i+1; j <= i .
2022-04-03 20:02:08
524
原创 货物摆放-蓝桥21
#include <iostream>#include<vector>using namespace std;typedef long long LL;int main(){ long long num=2021041820210418; vector<LL> yinzi; for(LL i=1;i*i<=num;i++){ if(num%i==0) {yinzi.push_back(i); if(num/i!=i) yin.
2022-04-03 16:25:03
384
原创 dp递归学习-2021蓝桥-跳跃
题目:跳跃 - 蓝桥云课 (lanqiao.cn)#include <bits/stdc++.h>using namespace std;int n,m;int dp(vector<vector<int>>&grid,vector<vector<int>>&memo,int x,int y){ int dx[] = {0,0,0,-1,-1,-1,-2,-2,-3}; int dy[] = {-1,-2..
2022-04-02 21:48:13
89
原创 Leecode_19_删除链表的倒数第N个节点
runtime error: member access within null pointer of type 'struct ListNode'struct ListNode* removeNthFromEnd(struct ListNode* head, int n){ struct ListNode*p=head; struct ListNode*pre=head; int i=0; while(p->next) { ++i; .
2021-12-23 14:45:17
204
原创 2021-06-11面向程序设计 类的相关学习中遇到的困惑
做类的练习题的时候,明明dog1和dog2一同调用了show.为什么第一个没能显示出制表符,只有第二个有制表符显示了???
2021-12-21 21:59:16
47
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人