首先我们来看一下动态sql,动态sql就是传递的参数不确定的时候,使用if,where,select,choose,set等标签,先来看一下 lib,rescources,以及utils里面文件不变,直接来看使用 直接看if跟where,if使用比较简单,就是if会有一个条件判断,如果条件满足,就会 ...
分类:
数据库 时间:
2020-02-02 01:24:37
阅读次数:
86
题意:输入一个 n 行 m 列 的矩阵, 搜索有多少个连通 ‘W'字母块 题解:DFS。 有个疑惑,就是输入一个字符串AC,一个字母一个字母的输入会 wa 找Bug找了一个小时多,甚至怀疑过自己的算法写错了,现在都没想通 莫名其妙贡献的一发wa. 欢迎大佬看见能告诉我QAQ #include <io ...
分类:
其他好文 时间:
2020-02-02 00:53:16
阅读次数:
108
题解:想象两只蚂蚁相遇后朝反方向走,如果无视不同蚂蚁的区别,可以认为是保持原样交错通过继续前进不会有任何问题,可 以认为蚂蚁是独立运动,求最长时间就是求蚂蚁到杆子端点的最大距离,求最短时间就是求蚂蚁到杆子端点的最短距离。 时间复杂度 O( n ) #include <iostream> #inclu ...
分类:
其他好文 时间:
2020-02-01 23:04:28
阅读次数:
78
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; const int N=10010<<1; struct node { int l,r,ans; } q[N]; int a[N],fa[N],d ...
分类:
其他好文 时间:
2020-02-01 21:18:27
阅读次数:
74
#include<iostream> #include<cmath> using namespace std; const int N=1010; int dx[N],dy[N]; int p[N]; int repair[N]; int n; int d; double get(int a,int ...
分类:
Web程序 时间:
2020-02-01 16:30:31
阅读次数:
97
#include<iostream> using namespace std; const int N=30010; int n,m,ans,p[N]; int find(int x) { if(p[x]!=x) p[x]=find(p[x]); return p[x]; } int main() ...
分类:
其他好文 时间:
2020-02-01 16:15:56
阅读次数:
50
#include<iostream> #include<cstdio> using namespace std; const int N=100010; int p[N]; int d[N]; int find(int x) { if(p[x]!=x) { int u=find(p[x]); d[x ...
分类:
其他好文 时间:
2020-02-01 16:15:15
阅读次数:
47
定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要 ...
分类:
其他好文 时间:
2020-02-01 12:30:41
阅读次数:
74
1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #include<queue> 5 #include<map> 6 #include<vector> 7 #include<set> 8 #include<string> ...
分类:
其他好文 时间:
2020-01-31 18:49:43
阅读次数:
71
这道题就是单调队列的裸题 今天刚学的单调队列 前几天刚学习完单调栈 感觉这两个东西非常相似哇 黄哥的一句话说破了他 他俩的区别就像队列和栈的区别233333 有关这道题倒没有太多说的 就是模拟队列 单调递增递减来找到区间最值 我这里用了数组模拟 问题就是G++ T了/// 而C++ AC 就很迷。。 ...
分类:
其他好文 时间:
2020-01-31 18:32:19
阅读次数:
79