考研复试

本文最后更新于 2025年4月9日 下午

一,机试

  • 常用库与输入输出
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h>
#include <stdlib.h> //动态内存
#include <stdbool.h>
#include <string.h>
#include <math.h>
//scanf
scanf(" %c %c %c",&a,&b,&c);// 输入时,里面的空格代表输入时任意长度的空格

//fgets 读取一行数据
scanf("%c",&c);//去除换行府,和fgets搭配使用
fgets(p,n,stdin);//读取一行数据,直到换行符或者指定字符长度n-1,<stdio.h>

//读取数组
char p[100];
scanf("%s",&p);

//数组结束,\0
//换行符,\n
//单字符可以当数字计算,使用对应的ASCLL编码,大小写字母相差32,大写更小,字符集256个
//占位符:%d %c %s %f %lf

/*
学校要求仅用这两个标准库
<stdio.h>:scanf(),fgets(),printf()

<stdlib.h>:rand(),malloc(),realloc(),free(),abs(int),qsort()
0-10的随机数:rand()%10

int cmp(const void *a,const void *b) {
return *(int*)a-*(int*)b;//可以换成char实现字符排序
}
qsort(num, n, sizeof(int), cmp);
qsort(数组名, 元素个数, 元素字节, 排序原则);

printf("%.2f",x); //打印保留两位小数,四舍五入
//变量四舍五入成整数
float a;
int aa = (int)(a+0.5);
*/

1.1 动态扩容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
int capacity = 2; // 初始容量
int size = 0; // 当前元素个数
int num; //输入数据

// 动态扩充内存
int *arr = (int *)malloc(capacity * sizeof(int));// 分配初始内存
printf("请输入整数(输入任意非数字字符结束):\n");
while (scanf("%d",&num) == 1) { //成功读取并赋值了n个输入项,scanf返回n,因此输入为整数时返回1
//也可以不设,使用ctral+z手动结束
// 如果当前元素个数达到容量上限,扩展内存
if (size >= capacity) {
capacity *= 2; // 容量翻倍
int *new_arr = (int *)realloc(arr, capacity * sizeof(int));// 重点,动态扩充内存
arr = new_arr; // 更新指针
}
arr[size++] = num; // 将输入的数存入数组,动态记录数组存储的数据量
}
// 释放动态数组内存
free(arr);

1.2 链表

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 1.结构体定义----------------------------------
typedef struct Lnode{
int data;
struct Lnode *next;
}Lnode,*sqlist;

// 2.头插入创建链表------------------------------
sqlist L = (Lnode*)malloc(sizeof(Lnode));
L->next = NULL;
sqlist s = (Lnode*)malloc(sizeof(Lnode)); //新建结点

// 3.链表插入----------------------------------
bool insert(sqlist L,int x){
sqlist T = (Lnode *)malloc(sizeof(Lnode));
T->data = x;
T->next = L->next;
L->next = T;
}

// 4.链表删除----------------------------------
int del(sqlist L){
if(L->next == NULL) return false;
int x;
sqlist H = L->next;
L->next = H->next;
x = H->data;
free(H);
return x;
}

1.3 栈与队列

1
//可使用头插法链表代替

1.4 括号匹配

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
int main(){
char b;
sqlist L = (Lnode *)malloc(sizeof(Lnode));//栈初始化
L->next = NULL;
while(scanf("%c",&b)){
if(b=='\n'){
break;
}
if(b=='('){
insert(L,b);
}
if(b==')'){//防止右括号过多与顺序不对
if(del(L)=='('){
continue;
}
else{
printf("error");
return 0;
}
}
}
if(L->next==NULL)printf("match");//防止左括号过多
else printf("error");
}

1.5 十进制转二进制

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//这里用的是数学方法,建议使用位运算
int main(){
int a;//除二所剩的商
scanf("%d",&a);
int b;//余数即二进制
int i=1;计算结果由低到高
int result = 0;
while(a>=1){
b = a%2;
a = a/2;
result += i*b;
i=i*10;
}
printf("%d\n",result);
}

1.6 最长不重复字符串

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
int check(char s[],int i,int j){//检查是否有重复字符
int k;
for(i;i<=j;i++){
for(k=i+1;k<=j;k++){
if(s[i]==s[k])return 0;
}
}
}
for(i=0;i<len;i++){
for(j=i+1;j<len;j++){
if(check(s,i,j)){
if(j-i+1>result)result=j-i+1;
}
else{
break;
}
}
}
printf("%d",result);

1.7 字符大小写转换

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//字符小写
char low(char c){
if (c >= 'A' && c <= 'Z') {
return c + 32;
}
// 如果不是大写字母,直接返回原字符
return c;
}

//字符大写
char up(char c){
if (c >= 'a' && c <= 'z') {
return c - 32;
}
// 如果不是小写字母,直接返回原字符
return c;
}

int main(){
char a[100]="[email protected]";
int i=0;
int j;
while(1){
if(a[i]=='\0'){printf("不是邮箱\n");
}
else if(a[i]=='@'){
printf("是邮箱\n");
for(j=1;j<i;j++){ //加密,第一个除外转换为星号
a[j]='*';
}
while(a[i]!='\0'){ //小写邮箱字符
a[i] = low(a[i]);
i++;
}
break;
}
i++;
}
printf("%s",a);
}

二,综合面试(个人项目概括)

  • 提前学习神经网络基础。

2.1 CNN

  • 数据集:MINIST数据集,28*28灰度图,要标准化
  • 结构:2*(卷积层+激活函数+池化层)+全连接+激活函数+全连接
    • 数据的通道:1 -> 32 -> 64,灰度图初始为1。
    • 卷积核(滤波器)的大小,3*3(有优化)
    • padding为1,步长默认为1
    • 池化:在每个 2x2 的区域内,步长为2,取最大值作为输出
    • 激活函数:relu

2.2 RNN与LSTM

  • 数据集:18万训练集,1万验证集与训练集,电影评论10分类。

  • 词汇表(分字)与词嵌入(腾讯)均下载在本地。

  • 输入固定长度25,多的填充。

  • RNN结构:

    • 词汇表大小:4762
    • 词嵌入维度:200
    • 隐藏层维度:128(隐藏层向量长128,每一个隐藏层的向量树)
    • RNN层数:2(多少层隐藏层)
    • 学习率:0.001
    • 额外要有 pad,unk 的索引
  • LSTM结构:

    • 词汇表大小:4762
    • 词嵌入维度:200
    • 隐藏层维度:128(隐藏层向量长128,每一个隐藏层的向量树)
    • LSTM层数:2(多少层隐藏层)
    • 学习率:0.001
    • 额外要有 pad,unk 的索引

2.3 transformer

  • 数据集:18万训练集,1万验证集与训练集,电影评论10分类。
  • 词汇表(分字)与词嵌入(腾讯)均下载在本地。
  • 输入固定长度25,多的填充。
  • 结构:
    • 词汇表大小:4762
    • 词嵌入维度:200
    • 编码器头数:4(确保词嵌入维度能被其整除)
    • 编码器层数:2(包含多头注意力层和前馈网络层)
    • 前馈网络的维度:400(词嵌入2-4倍)
    • Dropout概率:0.1
    • 学习率:0.0001
    • 额外要有 pad,unk 的索引

2.4 数学建模

  • 多波束测深问题
  • 问题一与问题二:建立几何模型,运用余弦定理
  • 问题三:通过贪心算法在斜度固定的坡面上覆盖最广的测线位置
  • 问题四:在给定海底坡面数据下,结合第三问通过蒙特卡洛模拟得出测线大概方向;再用最小二乘法进行坡面拟合,用改进的鲸鱼算法计算位置。
  • 问题:
    • 没有进行对比分析,只有自己计算的结果。
    • 数据验证存在问题。应该进行随机点检测。
    • 测线全为直线,不太现实。

2.5 自我介绍

  尊敬的各位老师,大家好!我是马锦,江西鄱阳人,来自西安工业大学物流管理专业。很荣幸能够在此参加复试。
  在本科学习方面,我的绩点为3.43,曾获得二等学业奖学金。
  在技能证书方面,我通过了英语四级,计算机python二级,获得了优秀共青团员。
  在竞赛方面,我获得了全国大学生数学建模陕西赛区二等奖,并且在比赛中担任主力,完成绝大部分任务。除此之外还有互联网+和物流管理专业方面的竞赛,都是校级奖项。
  在计算机学习方面,我在23年底就买了域名建立了自己的博客,并且把自己学习中的笔记发到博客上分享,我认为这是一件很让人满足的事。同时在寒假期间我也学习了很多关于深度学习方向的内容,像BP、CNN、RNN、LSTM、Transformer等主流网络结构,也学习了pytorch并通过它来实现这些网络,同时在数据集上进行应用。其中,BP神经网络我是通过数学公式实现的,然后因为做的是分类任务所以Transformer我只使用了编码器,这些在我的博客上都有记录。我的博客目前访问人数约1500人,访问次数约2800次。我很渴望学习到新的知识,我的规划是把暑假的时间用来补充基础知识和复现相关论文的能力。
  我非常希望能够加入贵校,在各位老师的指导下进一步提升自己。谢谢!

三,英语面试

  Good morning, dear professors. It’s a great honor for me to have this interview here today.
  First, I’d like to briefly introduce myself. My name is Ma Jin and I come from the Logistics Management major at Xi’an Technological University. During my college years, I participated in some competitions and achieved results. For example, I won the provincial second prize in the China Undergraduate Mathematical Contest in Modeling and the third prize in the “Internet plus” contest at my school; I have also obtained some certificates, such as CET-4, National Computer Level 2 Examination for Python, Outstanding Communist Youth League Member and so on.
  On top of that, The reason why I’m pursuing a master’s degree is that I wanna study the major I’m truly intrigued in and make achievements in my major. I chose Ningbo University because I wanna find a job in Ningbo. I studied here for my elementary and junior high school, and I really enjoy the life and customs here.
  Finally, If I’m admitted, I will continue to learn and improve myself, as well as actively participate in my mentor’s project.
  The above is my personal profile. Thank you for listening.

3.1 常见问题

1.介绍家乡

  My hometown is Poyang County, Jiangxi Province.
  Here is the largest freshwater lake —- Poyang Lake in China.
  There are many places of interest in Jiangxi province, like Lushan Mountain、Teng Wang Pavilion、Sanqing Mountain and so on.
  Besides,Jiangxi also has a deep red culture, Nanchang had the Nanchang Uprising, Jinggangshan had the revolutionary base, and Ruijin had the provisional central government.

2.爱好

  In the process of learning, I like to record my learning results on my blog.
  Now more than a thousand people have visited my blog;
  In my spare time, I like playing pingpang with my friends.And other ball games.

3.最喜欢的书/电影

  My favorite book is 《Father and Son》, it’s the first book I have read, it tells about the daily fun between a father and a son, which also contains life philosophy. Although this is the book I have read in my elementry school, I still remember it.
  My favorite movie is 《Lucy》. In the movie, when the human brain is 100 percent developed, it becomes information, like a supercomputer. I think is a very good idea for future. And maybe the future of AI will like it.

4.家庭

  There are four people in my family, my parents, my elder sister and me.
  My parents are both worker, they have worked here about 22 years. And they will try their best to support my study, and I am very grateful to my parents for their support.
  My sister is a graduate student in Jiangxi Normal University. She often help me about my study. Now she is a high school teacher in my hometown.

5.个人缺点/优点

  My weakness, I think I’m not good at providing emotional value, so maybe the conversation with girls is a little rough.
  My good points. I love to learn and work hard, And I often study for hours on end. In more details, I have my own blog and I often record my study notes on my blog and share it with others. Now more than a thousand people have visited my blog.

6.遇到突发情况怎么办(emergency)

  First, calm down and analyze the situation. I will not panic, because it will not help me to solve it.
  Second, make reasonable decisions based on my own abilities;
  Finally, follow up the resolution process I have made.
  Then the emergency may no longer be urgent, and I can make it.

7.为什么选择计算机专业

  I chose computer science because I’m intrigued in it, and I’m also optimistic about the future of artificial intelligence.
  I hope to become a talent in the field of computer science through professional study.

8.日常每周以及每天会保持多久的学习时间

  Every day I use the computer to study, maybe 5 hours a day.
  Weekends are also normal, so I study about 35 hours a week.

9.如何看待人工智能

  I’m confident that AI has a bright future. Now more and more people select AI to help them do their jobs. Although there are many aspects of AI cannot like humans, it can be combined with others and can run for a long time. This is useful in some areas, such as automation and harsh environments.

10.未来计划

  I plan to learn some basic knowledge this summer vacation.
  In the first year, I will learn and expand the knowledge in the class, and at the same time I will start to read some new papers.
  In the next two years, I will start my papers and participate in my mentor’s project.

11.英语重要吗

  I think English is very important.
  As a graduate student, it’s necessary to have English ability to attend meetings or read papers.
  For our computer students, the new information and the new papers are often in English, so we should learn English well.

12.旅游景点

  Lushan Mountain is located in Jiujiang County, every year many people travel there. On the mountain, sometimes, you can see the clouds under your feet, and as the same level with the sun. On top of that, You can also enjoy very healthy and fresh air in Lushan Mountain.

3.2 通用单元

1.对于解决某件事的问句
  In order to solve it, I’m going to take three steps. First, Second, Finally,

2.常用搭配
  Thank you for your question.
  When it comes to sth.(重复问题中的关键字)
  I’d like to mention sth.(回答中的关键字)

3.不会的
  Sorry,I didn’t hear clearly , could you ask the question again?

4.问题结束
  My answer is over, thank you.


考研复试
https://jimes.cn/2025/04/08/考研复试/
作者
Jimes
发布于
2025年4月8日
许可协议