![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机试指南
文章平均质量分 81
内推锦鲤
前端工程师
展开
-
计算机机试指南之动态规划
4.Coincidence 问题描述:find a longest common subsequence of two strings.(找到两个字符串的最长公共子序列) 输入:first and second line of each input case contain two strings of lowercase character a...z. there are no space原创 2018-01-30 13:59:12 · 403 阅读 · 0 评论 -
2013年北邮网研上机
#include<stdio.h> int main(){ int t; scanf("%d",&t); while(t--){ int n; scanf("%d",&n); int value[n]; for(int i = 0;i < n;i++) scanf("%d",&value[i]); int max = val..原创 2018-03-31 15:38:12 · 267 阅读 · 0 评论 -
2012年北邮网研上机
//2012年北邮网研院机试 A //2018/3/2 //by ben yafang #include<stdio.h> #include<string.h> int main(){ int t; scanf("%d",&t); while(t--){ char test; getchar(); scanf("%c",&test);//w...原创 2018-03-31 15:36:27 · 180 阅读 · 0 评论 -
2011年北邮网研上机题
//2011年网研院上机 A 字符串操作 //2018/3/19 //by ben yafang //done #include<stdio.h> #include<string.h> int main(){ char input[201]; scanf("%s",input); int l = strlen(input); int t; scanf("%d",...原创 2018-03-31 15:34:31 · 258 阅读 · 0 评论 -
2010北邮网研复试上机
//牛客网 查找 //2018/3/7 //by ben yafang //done #include<stdio.h> #include<iostream> #include<string.h> using namespace std; char input[101]; char order[101]; void Convert(char input[],i...原创 2018-03-31 15:33:07 · 268 阅读 · 0 评论 -
2013年北邮计算机学院上机题
//2013年北邮计算机 A 日期 //by ben yafang //2018/3/20 //done #include<stdio.h> #include<iostream> using namespace std; int day[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int runday[13] = {0,3...原创 2018-03-31 15:30:30 · 201 阅读 · 0 评论 -
2012年北邮计算机专业课机试
//2012年计算机学院机试 A 二叉排序树 //2018/3/3 //by ben yafang //done #include<stdio.h> #include<cstdio> using namespace std; struct node { int value; node *lchild; node *rchild; }*root; void ins...原创 2018-03-31 15:28:04 · 361 阅读 · 0 评论 -
2011年北邮计算机专业课机试
//2011年计算机学院复试上机 A 句子逆转 //by ben yafang //2018/3/19 //done //gets存储含有空格的字符串,输入结尾的换行符被换成'\0' #include<stdio.h> #include<string.h> #include<stack> using namespace std; stack<char&...原创 2018-03-31 15:25:40 · 448 阅读 · 0 评论 -
计算机机试指南之图论(1)
一、预备知识 快速使用邻接链表,使用标准模板库中的标准模板#include using namespace std;定义一个结构体,包括邻接节点和边权值,用来表示一条边 struct Edge{ int nextNode;//下一个节点编号 int cost;//该边的权重 }; 为每一个节点都建立一个单链表来保存与其相邻的边权值和节点的信息。 vector edge[N];//建立一原创 2018-01-30 14:53:44 · 293 阅读 · 0 评论 -
2014年北邮网研上机
#include<stdio.h> #include<math.h> int max(int a,int b){ return a > b?a:b; } int min(int a,int b){ return a < b? a:b; } int main(){ int n; while(scanf("%d",&n)!=EOF){ int i...原创 2018-03-31 15:39:56 · 298 阅读 · 0 评论