2015年网易公司校招笔试编程+3轮面试
来源:互联网 发布:搞笑淘宝客服对话 编辑:程序博客网 时间:2024/05/22 23:59
测试工程师技术笔试--两道编程题
1.递归思想
#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>#include <stack>#include <cctype>#include <vector>#include <cmath>#include <map>#define ll long longusing namespace std;ll ans;ll i;ll n;int main(){ int T; scanf("%d",&T); //for(int ccnt=1;ccnt<=T;ccnt++){ while(scanf("%lld",&n) != EOF) { n--; i=1; ans=1; //printf(" i=%I64d n=%I64d ans=%I64d\n",i,n,ans); while(n>=i+1) { n=n-i-1; ans+=i-1; i++; //printf(" i=%I64d n=%I64d ans=%I64d\n",i,n,ans); } ans+=n; printf("%lld\n",ans); } return 0;}2,建模
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 100;int n, m, k, a[N][N], vis[N][N];int main() { while (cin >> n >> m >> k) { memset(a, 0, sizeof(a)); for (int i = 1; i <= k; ++i) { int x, y; cin >> x >> y; a[x][y]++; } int ans = 0; for (int x1 = 1; x1 <= n - 2; ++x1) { for (int y1 = 1; y1 <= m - 2; ++y1) { for (int x2 = 1; x2 <= n - 2; ++x2) { for (int y2 = 1; y2 <= m - 2; ++y2) { memset(vis, 0, sizeof(vis)); int cur = 0; for (int ix = x1; ix <= x1 + 2; ++ix) { for (int iy = y1; iy <= y1 + 2; ++iy) { vis[ix][iy] = 1; cur += a[ix][iy]; } } for (int ix = x2; ix <= x2 + 2; ++ix) { for (int iy = y2; iy <= y2 + 2; ++iy) { if (!vis[ix][iy]) { cur += a[ix][iy]; } } } ans = max(ans, cur); } } } } cout << ans << endl; } return 0;}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
面试环节:
一面:
索引 二级索引查找 c++实现
shell 查找含义日期的log文件 并 删除
游标 的定义 书写
二面:
智力题:
怎么较准确的称量人的头的重量
A B 两个小岛各有一人 , B上的人生病了,A上的人有药,AB之间有船,C这个人管理,但他喜欢偷东西,现在AB各有一个钥匙和锁,每人只能开自己的锁,问怎么把药送给B.
HR面:
吹吹牛,聊聊天
0 0
- 2015年网易公司校招笔试编程+3轮面试
- 2017年网易校招笔试编程题第二题
- 2017年网易校招笔试编程题第一题
- 网易校招面试
- 网易校招面试
- 2017.9.9网易校招笔试最后一道编程解答
- (网易2018校招笔试)[编程题] 魔法币
- (网易2018校招笔试)[编程题] 相反数
- (网易2018校招笔试)[编程题] 字符串碎片
- (网易2018校招笔试)[编程题]相反数
- (网易2018校招笔试)[编程题] 游历魔法王国
- (网易2018校招笔试)[编程题] 字符串碎片
- (网易2018校招笔试)[编程题] 魔法币
- (网易2018校招笔试)[编程题] 相反数
- (网易2018校招笔试)[编程题] 字符串碎片
- (网易2018校招笔试)[编程题] 游历魔法王国
- 赶去公司--网易2017春招实习笔试编程题2
- 网易校招笔试题
- 微信公众号接入
- Android系统中的广播(Broadcast)机制简要介绍和学习计划
- The type javax.servlet.ServletContext cannot be resolved. It is indirectly referenced from required
- android获得手机cpu型号
- mongodb集群搭建-replica set模式
- 2015年网易公司校招笔试编程+3轮面试
- Linux下jboss6.1.0日志输出设置
- Unity3d中BlinnPhong光照模型注解
- AIX下取前一天时间
- 如何对map中的value进行排序
- Android应用程序发送广播(sendBroadcast)的过程分析
- java中super和this关键字解析
- ZigBee使用Z-Stack协议栈时如何关闭ACK验证
- 2009