一.图像数据源 图像数据源用于从目录加载图像文件,它可以通过ImageIO Java库将压缩图像(jpeg,png等)加载为原始图像表示形式。加载的DataFrame具有一StructType列:“ image”,其中包含存储为图像架构的图像数据。该image列的架构为: origin :(Stri ...
分类:
其他好文 时间:
2020-09-17 17:38:02
阅读次数:
52
// 字典树的左儿子右兄弟法 // 相同长度则为 strlen(str)*2 + 2 不同则为 公共前缀 + 1 #include<bits/stdc++.h> #define rep(i, n) for(int i=0;i!=n;++i) #define per(i, n) for(int i=n ...
分类:
其他好文 时间:
2020-09-17 14:15:04
阅读次数:
28
因为在复习数据结构和C语言(宁夏大学),试卷上的算法题只可以使用纯C去完成, 所以这里为了以防万一,复习一下二重指针。 需求: 将某个变量传参之后, 需要改变这个变量的地址, 将本变量指向一个新的地址。 typedef struct SqStack { int data[maxSize]; int ...
分类:
其他好文 时间:
2020-09-17 14:10:39
阅读次数:
33
这种题目很容易就联想到独立算贡献,某条边的贡献就是他的权值和底下叶子节点的数量相关。 我们用优先队列的方法取最大,记得算大小的时候是按减一半的贡献再算 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef ...
分类:
其他好文 时间:
2020-09-17 13:36:21
阅读次数:
28
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), r ...
分类:
其他好文 时间:
2020-09-16 12:19:36
阅读次数:
29
给定一个字符串,逐个翻转字符串中的每个单词。例如,输入: "the sky is blue",输出: "blue is sky the"。 package main import ( "fmt" "strings" ) type SStack struct { elems []string } fu ...
分类:
其他好文 时间:
2020-09-12 21:30:46
阅读次数:
50
这段时间有点忙,好久没打CF了 A 考虑到n与n-1互质,可以把数列分成两段操作[1,1][2,n],全部加成n的倍数,再操作[1,n]即可,注意特判n=1 #include<bits/stdc++.h> using namespace std; typedef long long ll; cons ...
分类:
其他好文 时间:
2020-09-11 16:00:37
阅读次数:
48
#include <iostream> #include <cstdio> #include <cstring> using namespace std; const int N = 2000010; typedef long long LL; int n; //t[i]表示树状数组i结点覆盖的范围 ...
分类:
编程语言 时间:
2020-09-11 14:22:54
阅读次数:
34
题:https://atcoder.jp/contests/abc177/tasks/abc177_f 题意:给定n和m,代表有(n+1)*m的矩阵,有n个询问,每个询问给定a和b,代表在第 i 行的第a列到第b列,不能进行向下操作,其余位置可以进行向下或向右操作,问在给定的限制中,从第1行的任意位 ...
分类:
其他好文 时间:
2020-09-10 23:07:00
阅读次数:
45
按边权把边从小到大排序 用并查集加边 检查是否为连通图 #include<iostream> #include<algorithm> using namespace std; const int N = 100010, E = 200010; struct edge{ int a, b, w; bo ...
分类:
编程语言 时间:
2020-09-10 22:59:17
阅读次数:
38