牛客网编程题结果是根据最后一次保存结果还是历史最高保存结果来

如题,俄罗斯套头程序之前ac了80%,最后修改程序 出错,但是没时间自动提交了
这种情况是算我 最后自动提交的结果吗?
全部评论
最高通过比例算分
点赞 回复 分享
发布于 2017-04-23 12:10
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <map> using namespace std; struct Recta { int width; int height; Recta(int _w = 0, int _h = 0) :width(_w), height(_h) {}; }; bool m_comp(const Recta& a, const Recta& b) { if (a.width == b.width) { return a.height < b.height; } else { return a.width < b.width; } } int maxCount(int number, vector<Recta> datas) { int res = 1; int outW, outH; sort(datas.begin(), datas.end(), m_comp); //按照width升序排序 outW = datas[0].width; outH = datas[0].height; for (int i = 1; i < number; i++) { if (datas[i].width > outW && datas[i].height > outH) { res++; outW = datas[i].width; outH = datas[i].height; } } return res; } int main() { int number; Recta temp; while (cin>>number) { vector<Recta> datas(number); for (int i = 0; i < number; i++) { cin >> temp.width >> temp.height; datas[i] = temp; } cout << maxCount(number,datas) << endl; } //system("pause"); return 0; }
点赞 回复 分享
发布于 2017-04-23 07:52
上一次的吧
点赞 回复 分享
发布于 2017-04-22 21:37
不会吧,应该算你上一次提交结果
点赞 回复 分享
发布于 2017-04-22 21:34
不会
点赞 回复 分享
发布于 2017-04-22 21:18

相关推荐

06-15 02:05
已编辑
南昌航空大学 数据分析师
Eason三木:你如果想干技术岗,那几个发公众号合唱比赛的经历就去掉,优秀团员去掉,求职没用。然后CET4这种不是奖项,是技能,放到下面的专业技能里或者单独列一个英语能力。 另外好好改改你的排版,首行缩进完全没有必要,行间距好好调调,别让字和标题背景黏在一起,你下面说能做高质量PPT你得展现出来啊,你这简历排版我用PPT做的都能比你做的好。 然后自我评价,你如果要干数据工程师,抗压能力强最起码得有吧。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务