招商银行的编程题没什么难度呀,是不是根据后面的问答题筛选人了

刚刚做完,编程题全A了。。
全部评论
+1
点赞 回复 分享
发布于 2017-09-13 20:43
确实挺水的
点赞 回复 分享
发布于 2017-09-13 20:44
唉,应该先做编程的,简答写太简单了怕没时间
点赞 回复 分享
发布于 2017-09-13 20:45
你是什么岗?
点赞 回复 分享
发布于 2017-09-13 20:45
一个50  一个60  。。。。。
点赞 回复 分享
发布于 2017-09-13 20:59
不是  是根据简历刷人
点赞 回复 分享
发布于 2017-09-13 21:03
第二题代码贴出来看下
点赞 回复 分享
发布于 2017-09-13 21:05
你们有信用卡用户推荐新用户的编程题么?
点赞 回复 分享
发布于 2017-09-13 21:08
简直简单到爆炸。。。
点赞 回复 分享
发布于 2017-09-13 21:08
#include <iostream> #include <vector> using namespace std; void test1(){     unsigned a,b,n;          cin >> a >> b >> n;          if (a > b) {         int t = a;         a = b;         b = t;     }               int count = 0;     for (int i = b; i <= n; i++) {         if (i % a == 0 && i % b == 0) {             count ++;         }              }          cout << count << endl; } // 2 1 1 3 4 7 1 1 4 int getSelect(vector<int> nums,int index){          int select = 0;          if (nums.size() - index == 2) {         return 2;     }          if (nums.size() - index == 1) {         return 1;     }          if (nums.size() - index == 4) {                  if (nums[index] + nums[index+1] > nums[index] + nums[index + 3]) {             return 2;         }else{                      return 1;         }     }               if (nums.size() - index > 4) {                  int resultA1 = nums[index] + nums[index + 1];         int resultA2 = nums[index];                  int resultB1 = nums[index + 2] + nums[index + 3];         int resultB2 = nums[index+1] + nums[index + 2];                  if (resultA1 - resultB1 > resultA2 - resultB2) {             select = 2;         }else{                          select = 1;         }                       }else{         select = 2;     }          return select; } bool test2(){          int n;     cin >> n;          vector<int> nums;          while (n-- > 0) {                  int num;         cin >> num;                  nums.push_back(num);     }          int aHigh = 0;     int bHigh = 0;          int count = nums.size();          int index = 0;          while (count - index > 0) {                  int aSelect = getSelect(nums,index);         if (aSelect == 1) {             aHigh += nums[index];         }else{                      aHigh += nums[index] + nums[index + 1];         }                  index += aSelect;                           int bSelect = getSelect(nums,index);         if (bSelect == 1) {             bHigh += nums[index];         }else{                          bHigh += nums[index] + nums[index + 1];         }                  index += bSelect;              }               return aHigh > bHigh;      } int main(int argc, const char * argv[]) {          if (test2()) {         cout << "true";     }else{              cout << "false";     }                    return 0; }
点赞 回复 分享
发布于 2017-09-13 21:08
不是有动态规划吗?感觉也不简单
点赞 回复 分享
发布于 2017-09-13 22:47
我是测试岗 我觉得也不太难 可我编程题还是没AC.....
点赞 回复 分享
发布于 2017-09-13 22:56
想多了,银行这种看学历的。不笔试又有人说它黑,所以,象征性的笔一下喽
点赞 回复 分享
发布于 2017-09-14 11:41

相关推荐

黑皮白袜臭脚体育生:春节刚过就开卷吗?哈基馆,你这家伙......
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务