2017-07-10:考试(再次爆int,记住用long long)

Now the commencement speakers will typically also wish you good luck and extend good wishes to you. I will not do that, and I’ll tell you why.
From time to time in the years to come, I hope you will be treated unfairly, so that you will come to know the value of justice.
I hope that you will suffer betrayal because that will teach you the importance of loyalty.
Sorry to say, but I hope you will be lonely from time to time so that you don’t take friends for granted.
I wish you bad luck, again, from time to time so that you will be conscious of the role of chance in life and understand that your success is not completely deserved and that the failure of others is not completely deserved either.
And when you lose, as you will from time to time, I hope every now and then, your opponent will gloat over your failure. It is a way for you to understand the importance of sportsmanship.
I hope you’ll be ignored so you know the importance of listening to others,
and I hope you will have just enough pain to learn compassion.
Whether I wish these things or not, they’re going to happen.And whether you benefit from them or not will depend upon your ability to see the message in your misfortunes.


一题:快速幂用long long;


二题:用数组会爆内存,所以用vector;

用vector的好处:

在子函数内部定义vector是动态保存的,当再次返回此状态时,原来的vector内的数据仍然存在

#include<vector>;
vector<long long>vec;

vec.push_back(x);
tot++;

sort(vec.begin(),vec.end());
y=vec[tot-1];

三题:
1.曼哈顿距离:红色线为曼哈顿距离,绿色线为欧式距离(直线距离),蓝色与黄色为等价曼哈顿距离
红色线为曼哈顿距离,绿色线为欧式距离(直线距离),蓝色与黄色为等价曼哈顿距离

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值