腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
wym
专栏作者
举报
404
文章
301807
阅读量
27
订阅数
订阅专栏
申请加入专栏
全部文章(404)
编程算法(93)
其他(87)
java(34)
ios(19)
opencv(10)
c++(9)
数组(9)
php(8)
numpy(8)
协议(8)
sum(7)
排序(7)
人工智能(6)
windows(5)
数据结构(5)
dp(5)
函数(5)
linux(4)
存储(4)
max(4)
python(3)
node.js(3)
jdbc(3)
add(3)
int(3)
min(3)
ide(2)
eclipse(2)
海外加速(2)
图像处理(2)
游戏(2)
网络安全(2)
二叉树(2)
nat(2)
任务调度(2)
null(2)
vector(2)
遍历(2)
对象(2)
反射(2)
连接(2)
数据(2)
网络(2)
优化(2)
c 语言(1)
go(1)
html(1)
汇编语言(1)
oracle(1)
sql(1)
git(1)
api(1)
图片标签(1)
医疗(1)
http(1)
容器(1)
jdk(1)
正则表达式(1)
hashmap(1)
asp(1)
tcp/ip(1)
gcc(1)
socket编程(1)
小程序(1)
机器人(1)
数据分析(1)
https(1)
架构设计(1)
小程序·云开发(1)
axis(1)
cut(1)
ddd(1)
dfs(1)
find(1)
for循环(1)
hook(1)
inline(1)
input(1)
math(1)
mean(1)
median(1)
monitor(1)
network(1)
output(1)
rank(1)
root(1)
sample(1)
scanf(1)
select(1)
set(1)
static(1)
stl(1)
time(1)
torch(1)
编程(1)
变量(1)
编译(1)
产品(1)
程序(1)
递归(1)
队列(1)
管理(1)
继承(1)
基础(1)
集合(1)
流量(1)
数学(1)
搜索(1)
调试(1)
统计(1)
效率(1)
原理(1)
源码(1)
指针(1)
作用域(1)
搜索文章
搜索
搜索
关闭
输入广义表建立二叉树(层序输出)
其他
#include <bits/stdc++.h> using namespace std; struct node{ char ch; node *lc,*rc; }; char s[100]; int flag=0; int n; int i=0; node * build_tree() { if(i>=n) return NULL; node *p = new node; p->lc = NULL; p->rc = NULL; p->ch = '0';//初始化 for(;i<n;
用户2965768
2018-12-18
1K
0
中序遍历二叉树(栈思想)
其他
完整代码如下,这是我在做了广义表建立二叉树后顺便写的中序遍历二叉树,所以输入是广义表
用户2965768
2018-12-18
536
0
一元稀疏多项式计算 (数据结构实验)
其他
#include <bits/stdc++.h> using namespace std; struct node{ float coef;//系数 int exp;//指数 node * next; }; node * creat(node * l) { float coef; int exp; l = new node; node * p,* q; scanf("%f %d",&coef,&exp); p=l; while(coef!=0||exp!=0) { p->co
用户2965768
2018-12-05
1.1K
0
JAVA 栈的操作
其他
栈是一种后入先出的数据结构。有以下基本操作。 Stack stack = new Stack(); stack.push() 元素入栈 stack.pop() 栈顶元素出栈 stack.peek() 查看栈顶元素 stack.size() 查看栈的大小 stack.empty()判断栈是否为空, true or false stack.serch(** ***)查找元素 ,返回int. 若找到返回位置,找不到返回-1 下面为了方便用了Enumeration类 package expres
用户2965768
2018-11-22
1K
0
ACM / ICPC 2018亚洲区预选赛北京赛站网络赛 3题签到
其他
选择一个城市开始,必须按照顺时针遍历完所有城市,第一次到这个城市获得ai经费,到下一个城市的代价是bi
用户2965768
2018-09-29
438
0
opencv学习笔记 python实现 图像梯度与图像边缘
其他
图像梯度即求导数,导数能反映出图像变化最大的地方,图像变化最大的地方也就是图像的边缘。
用户2965768
2018-09-29
1.1K
0
The 2018 ACM-ICPC Asia Qingdao Regional Contest, Online(四题签到)
其他
C题 用map超时,mmp map一直超时写了两个小时,单纯的数组就行 思路:有n条指令,值为r 存下执行第i条指令的时候的值r,若重复则输出“No” 否则“Yes” //C #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <algorithm> using namespace std; typedef long long llong; const int MAXN = 10000
用户2965768
2018-09-29
523
0
ACM-ICPC 2018 焦作赛区网络预赛 Give Candies
其他
最后还要除以2,因为是n-1次方,乘以逆元,防止除2出现各种问题(2*逆元=1000000008)
用户2965768
2018-09-29
554
0
2013年多校 hdu 4602
其他
题目传送门 遇事不决先打表: 打表代码 #include <bits/stdc++.h> using namespace std; int num[1000]; deque<int> a,b; void dfs(int n,int _n) { if(n==0) { while(_n--) {int t=a.front(); num[t]++; a.pop_front(); a.push_back(t); } return ; } for(int i=1;i<=n;
用户2965768
2018-09-29
267
0
2013年多校赛 hdu4607
其他
那么就考虑树上最长距离,树的直径, 如果访问的点大于树的直径就要走回头路,答案即多的数乘2加上原来树的直径
用户2965768
2018-09-29
289
0
ACM-ICPC 2018 徐州赛区网络预赛F. Features Track
其他
//滚动数组思想 #include <iostream> #include <queue> #include <algorithm> #include <map> struct NODE { int x,y; bool operator < (const NODE &b)const { if(x==b.x)return y<b.y; else return x<b.x; } }; using namespace std; int main() { int t; map<NOD
用户2965768
2018-09-29
427
0
分解质因子
其他
void getp(LL n) { //分解质因子 p = 0; for(int i = 2; i * i <= n; i++) { if(n % i == 0) { arr[p++] = i; while(n % i == 0) n /= i; } } if(n > 1) arr[p++] = n; }
用户2965768
2018-09-29
415
0
Manthan, Codefest 18 (rated, Div. 1 + Div. 2)A B C
其他
A #include <iostream> using namespace std; int cnt; void solve(int n) { cnt=0; while(n>=(1<<(cnt))) { cnt++; } } int main() { int n; cnt=0; scanf("%d",&n); solve(n); printf("%d\n",cnt); return 0; } B #include <iostream> #include <algorith
用户2965768
2018-09-29
306
0
python实现 opencv 学习笔记 图像二值化
其他
import cv2 as cv def threshold_image(image): gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY) cv.imshow("yuantu", gray) ret, binary = cv.threshold(gray, 0, 255, cv.THRESH_BINARY | cv.THRESH_OTSU) print(ret) cv.imshow("OTSU", binary) r
用户2965768
2018-09-29
1.2K
0
python实现 opencv 学习笔记---模板匹配matchTemplate
其他
这是打印出result的值,下面一张图是计算公式,通过公式也可以知道匹配程度在什么情况下最好
用户2965768
2018-09-29
2.6K
0
opencv下imread函数返回值
其他
openCV的imread()函数和imwrite()函数能支持各种静态图像文件格式。
用户2965768
2018-08-30
3.2K
0
南昌大学航天杯第二届程序设计竞赛校赛网络同步赛 H小q的数列
其他
while ((ch = getchar()) >= '0' && ch <= '9'){
用户2965768
2018-08-30
252
0
Train Problem I HDU 1022
其他
#include <queue> #include <cstring> #include <string> using namespace std; int book[200],in[200],out[200]; string ans[200]; int main() { int n,t; int flag=1; deque<int> q; while(cin>>n) { t=0; flag=1; memset(book,0,sizeof(book)); while(!q.empty())q.pop_back(); getchar(); for(int i=1;i<=n;i++) { char ch; scanf("%c",&ch); in[i]=ch-'0'; } getchar(); for(int i=1;i<=n;i++) { char ch; scanf("%c",&ch); out[i]=ch-'0'; } //for(int i=1;i<=n;i++) //cout<<in[i]<<" "<<out[i]<<endl; for(int i=1;i<=n;i++) { if(book[out[i]]&&q.back()==out[i]) { q.pop_back(); ans[t++]="out"; continue; }else if(book[out[i]]) { printf("No.\nFINISH\n"); flag=0; break; } int j; while(!book[out[i]]) { for( j=1;j<=n;j++) if(!book[in[j]]) break; book[in[j]]=1; q.push_back(in[j]); ans[t++]="in"; } ans[t++]="out"; q.pop_back(); } if(flag) { printf("Yes.\n"); for(int i=0;i<t;i++) cout<<ans[i]<<"\n"; printf("FINISH\n"); } } return 0; }
用户2965768
2018-08-30
222
0
hdu 1025 Constructing Roads In JGShining's Kingdom
其他
JGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. Half of these cities are rich in resource (we call them rich cities) while the others are short of resource (we call them poor cities). Each poor city is short of exactly one kind of resource and also each rich city is rich in exactly one kind of resource. You may assume no two poor cities are short of one same kind of resource and no two rich cities are rich in one same kind of resource. With the development of industry, poor cities wanna import resource from rich ones. The roads existed are so small that they're unable to ensure the heavy trucks, so new roads should be built. The poor cities strongly BS each other, so are the rich ones. Poor cities don't wanna build a road with other poor ones, and rich ones also can't abide sharing an end of road with other rich ones. Because of economic benefit, any rich city will be willing to export resource to any poor one. Rich citis marked from 1 to n are located in Line I and poor ones marked from 1 to n are located in Line II. The location of Rich City 1 is on the left of all other cities, Rich City 2 is on the left of all other cities excluding Rich City 1, Rich City 3 is on the right of Rich City 1 and Rich City 2 but on the left of all other cities ... And so as the poor ones. But as you know, two crossed roads may cause a lot of traffic accident so JGShining has established a law to forbid constructing crossed roads. For example, the roads in Figure I are forbidden.
用户2965768
2018-08-30
380
0
hdu1026 Ignatius and the Princess I(bfs+路径)
其他
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 21262 Accepted Submission(s): 6890 Special Judge
用户2965768
2018-08-30
359
0
点击加载更多
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
立即发文
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档