网易笔试,有没有大神公布一下答案,学习一下

1.吃葡萄 
2.积木 
3.跳柱子
 4.逆序
#网易##笔试题目#
全部评论
大家都a了多少  是不是我太菜了
点赞 回复
分享
发布于 2019-09-21 17:07
就a'了积木的。。。。
点赞 回复
分享
发布于 2019-09-21 17:11
滴滴
校招火热招聘中
官网直投
输出怎么都不对。。。看不懂了
点赞 回复
分享
发布于 2019-09-21 17:14
// 吃葡萄 #include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){     int t;     vector<int> grape(3);     usigned ll sum, ans;     cin >> t;     while(t--){         for(int i = 0; i < 3; i++)             cin >> grape[i];         sum = grape[0] + grape[1] + grape[2];         sort(grape.begin(), grape.end());         if(grape[0] + grape[1] >= grape[2]/2){             if(sum % 3)                 ans = sum / 3 + 1;             else                 ans = sum;         }else{             if(grape[2] % 2)                 ans = grape[2] / 2;             else                 ans = grape[2] / 2 + 1;         }         cout << ans << endl;     } }
点赞 回复
分享
发布于 2019-09-22 09:37

相关推荐

点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务