unickcheng / competition Goto Github PK
View Code? Open in Web Editor NEW这个项目,目前将只用于更新近年来蓝桥杯软件类赛题题解和PAT(浙江大学计算机程序设计能力考试)赛题题解
这个项目,目前将只用于更新近年来蓝桥杯软件类赛题题解和PAT(浙江大学计算机程序设计能力考试)赛题题解
关于分数排序两种方案
int build(int l1,int r1,int l2,int r2)
{
if(l1>r1) return 0;
int node=post_order[r2];
int p=l1;
while(in_order[p]!=node) p++;
ltree[node]=build(l1,p-1,l2,l2+p-l1-1);
rtree[node]=build(p+1,r1,l2+p-l1,r2-1);
return node;
}
void bfs(int root)
{//广度搜索进行层次遍历
queue<int> q;
q.push(root);
while(!q.empty())
{
int u=q.front();q.pop();
printf("%d ",u);
if(ltree[u]) q.push(ltree[u]);
if(rtree[u]) q.push(rtree[u]);
}
}
void proOrder(int node)
{//先序遍历
printf("%d ",node);
if(ltree[node]) pro(ltree[node]);
if(rtree[node]) pro(rtree[node]);
}
void inOrder(int node)
{//中序遍历
if(ltree[node]) pro(ltree[node]);
printf("%d ",node);
if(rtree[node]) pro(rtree[node]);
}
void postOrder(int node)
{//后序遍历
if(ltree[node]) pro(ltree[node]);
if(rtree[node]) pro(rtree[node]);
printf("%d ",node);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.