由买买提看人间百态

topics

全部话题 - 话题: max2
1 2 3 4 下页 末页 (共4页)
z****0
发帖数: 39
1
leeco max2 拍照不行,其他还不错,刷了xda上的系统
s*****r
发帖数: 11545
2
请问 Le max2 是 4G 3G 么?
F******r
发帖数: 9
3
是 正在用,freedompop+TracFone. 国际版的rom电池无敌,可惜推送总是漏。刷了
Android 8,中度试用一天没问题。这次tracfone给我激活了9倍的time airline,一次
性给了我4500min+4500message+4.5G, 可惜有效期还是1年。我估计是系统错误,坐等
被取消

:请问 Le max2 是 4G 3G 么?
s*****r
发帖数: 11545
4
Thank you!!!


: 是 正在用,freedompop TracFone. 国际版的rom电池无敌,可惜推送总是漏。
刷了

: Android 8,中度试用一天没问题。这次tracfone给我激活了9倍的time airline
,一次

: 性给了我4500min 4500message 4.5G, 可惜有效期还是1年。我估计是系统错误
,坐等

: 被取消

: :请问 Le max2 是 4G 3G 么?

c***2
发帖数: 838
5
来自主题: JobHunting版 - 找最大俩数的代码怎么写?
doing the tournament with complexity N+lgN in the cost of extra stack spaces
used for recursion
straightforward 2-pass scanning takes N-1+N-2=2N-3 with no extra space
Tournament:
void find_max_2max(int a[], int start, int end, int *max, int *max2)
{
int i, mid;
int max00,max01,max10,max11;
int temp1,temp2;

if(start==end){
*max=a[start];
*max2=a[start];
return;
}

if(end-start==1){
*max=MAX(a[start],a[end]);
*max2=MIN(a[start]... 阅读全帖
i*****e
发帖数: 113
6
来自主题: JobHunting版 - amazon一面面经
用的就是这个方法,步长为2递增
下面就是我给他念的代码,略微有点不同,比如static/inline的修饰什么的,以及有
符号数和无符号数比较,当时没注意到
static inline void elect(int& max1, int& max2, int num)
{
if (num > max1) {
max1 = num;
} else if (num > max2) {
max2 = num;
}
}
int find_2nd_max(const int* array, size_t len)
{
int max1 = MININUM_INTEGER, max2 = MINUM_INTEGER;
int tmp;
for (unsigned i = 0; i < len; i += 2) {
tmp = std::max(a[i], a[i+1]);
elect(max1, max2, tmp);
}
if ((len & 0x01) != 0) {
o****d
发帖数: 2835
7
来自主题: JobHunting版 - 关于atoi的overflow
http://discuss.leetcode.com/questions/192/string-to-integer-ato
Am I right?
We can separate INT_MAX and INT_MIN to first n-1 digits and last one digit,
which can be used to check overflow before the answer really overflows. Note
that abs(INT_MIN)=INT_MAX+1.
class Solution {
public:
int atoi(const char *str) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int pos=0;
//skip whitespace
while(str[pos]==' ')pos++;
//check if negative
int negative=0;
if(... 阅读全帖
c********t
发帖数: 5706
8
nice.二爷总是直接上最优解,不给别人机会啊。
贴个我的
public int maxProfit(int[] prices) {
if (prices == null || prices.length == 0)
return 0;
int n = prices.length;
int buy1 = prices[0], max1 = 0;
int sell2 = prices[n - 1], max2 = 0;
int total = 0;
int[] profit = new int[n];
for (int i = 0; i < n; i++) {
buy1 = Math.min(buy1, prices[i]);
max1 = Math.max(max1, prices[i] - buy1);
profit[i] += max1;
int j = n - i - 1;
sell2 = Math.max(sell2, pric... 阅读全帖
c********t
发帖数: 5706
9
nice.二爷总是直接上最优解,不给别人机会啊。
贴个我的
public int maxProfit(int[] prices) {
if (prices == null || prices.length == 0)
return 0;
int n = prices.length;
int buy1 = prices[0], max1 = 0;
int sell2 = prices[n - 1], max2 = 0;
int total = 0;
int[] profit = new int[n];
for (int i = 0; i < n; i++) {
buy1 = Math.min(buy1, prices[i]);
max1 = Math.max(max1, prices[i] - buy1);
profit[i] += max1;
int j = n - i - 1;
sell2 = Math.max(sell2, pric... 阅读全帖
s********x
发帖数: 81
10
来自主题: JobHunting版 - leetcode的run time error
大家好,最近做了两题leetcode, 但是都遇到了run time error. 但是我遇到run time
error 的例子在别的c++编译器上都顺利通过了,请大家帮我看一下是什么问题. 谢谢
大家!
问题一:next permutation:
class Solution {
public:
int findSecondMax(vector &num, int cur){
int max1=-1, max2=-2;
int index1=-1, index2=-2;
for(int i=cur; i if(max1 max2=max1;
index2=index1;
max1=num[i];
index1=i;
}
}
if(max2!=-2 || max2!=-1) return index2;
else return index1;
}

... 阅读全帖
z**********r
发帖数: 86
11
我现在在学习Java,以前会C/C++,但是主要是用C和Matlab。
我用的是Weiss "Data Structures and Problem Solving Using Java 3rd Edition",
现在看到了第四章,关于继承。
里面有一道习题(4.23):
Write generic method max2, which accepts an array and return an array of
length two representing the two largest item in the array. The input array
should be unchanged. Then use this method on String type.
最下面是我的代码。现在我的问题是,我知道创建一个generic array是不被允许的。
StackOverflow上面有人给了一种方法:
AnyType []result=(AnyType []) new Object[2];
这种方法编译没有错的,但是运行的时候会出现[Ljava.lang.Object; ... 阅读全帖
S**I
发帖数: 15689
12
来自主题: JobHunting版 - 讨论几道M家的题
1.
a) Make a duplicate of the first array and put it after the last array.
b) Create a graph, let each node in the graph represent an element in each
arrays, add an edge between each node pair in adjacent arrays with weight as
absolute difference between these two nodes.
c) create a super source s which connects to all elements in the first array
with edges having equal weight and create a super destination d which
connects to all elements in the last array with edges having equal weight.
d) Fin... 阅读全帖
c****9
发帖数: 5402
13
来自主题: CellularPlan版 - 请问目前哪个手机能双卡双待啊
我两个都有,实测是Le Max2 电池比Moto好的不是一点点。Le Max2 是2K屏,我的亮屏
使用可以达到4-5小时,这个很不错了。Moto的G4 Plus亮屏能到4个小时都不容易。
Le Max2是双卡双待(4+3)。
F********e
发帖数: 1942
14
来自主题: BrainTeaser版 - brainteaser
对你来说,
case 1.第一块选大的,第二个被对手全拿; max1=第一块的大的部分+o()
case 2.第一块不选,第二个选大的;max2=第一块小部分+半块+o()
所以对于切的人来说;最优化策略为让你得到min(max1,max2)=3/4块
m***8
发帖数: 1786
15
来自主题: CellularPlan版 - XM 的SIM 卡不能用在LECO MAX 2 上吧?
我觉得理论上可行。你的乐视max2型号是什么?x821带完整CDMA频段bc0, bc1。
网上有人用天机7双卡,Verizon语音 ATT数据可以用。
国产机同时带bc0和bc1的不多,只有bc0的不少,虽然会导致Verizon覆盖差,也应该可
用。
你试试max2,回来update一下结果
m***8
发帖数: 1786
16
来自主题: CellularPlan版 - XM 的SIM 卡不能用在LECO MAX 2 上吧?
你是什么版本的max2?我记得北美版没有CDMA(或不全),印度版x821才CDMA齐全。不
知道北美版刷印度ROM能否打开CDMA。
你说的现象,如果你的max2没有CDMA,就完全可以解释了。


: Le Max 2虽然有这些频段,但是用XM的卡(卡槽1)只有数据,Voice: Out of
service

: 。不是卡的问题,XM的卡放在Nexus 6P里面就一切OK。所以这个手机有什么地方
没有配

: 置好。问题是国产手机没有OTA的触发点,*228也不能用。

: XM FP的想法在Le Max 2上不可行。当指定卡2 用数据时,卡1就都out of
service了

: 。而指定卡1数据时,卡2数据就out of service.

b*****t
发帖数: 9671
17
上午12:06(17 小时前)百度联盟百万收入会员月报表(番茄花园出事前两个月)黑黑
黑。。 - 站长资源交流 - 落伍者站长论坛从 牛博山寨 编辑推荐 作者:(author
unknown)Shared by 大犇
谁看了都会心动
百度联盟2008年6月份合作会员收入月报表(番茄花园出事前两个月,番茄花园出事为
08年8月)
请大家不要怀疑这份数据的真实性了。
我解释了很多遍。如果觉得不准可以找到里面的人或朋友查一下08年6月份百度的分成
真的假不了。假的真不了。请看下面
尊敬的百度联盟会员dwso,您好:您上月的佣金收入为2933935.04元 番茄花园 盗版光盘
尊敬的百度联盟会员ylmf,您好:您上月的佣金收入为1548817.27元,雨林木风 盗版
光盘
尊敬的百度联盟会员wzjujumao,您好:您上月的佣金收入为579124.71元 (当年二级
域名jujumao.hao123.com 猪猪猫Ghost盗版光盘)
尊敬的百度联盟会员9991com,您好:您上月的佣金收入为486803.28元 (9991.com多特
修改软件注入IE注册表为百度+萝卜GHOST盗版光盘)
... 阅读全帖
s*x
发帖数: 8041
18
来自主题: Military版 - 小米Mix2手机 牛大了
这是小米mix2,不是max2. Max是六寸屏的那个
h****g
发帖数: 11365
19
来自主题: Military版 - 小米Mix2手机 牛大了
mix2,不是max2
w*******4
发帖数: 361
20
来自主题: Military版 - 小米Mix2手机 牛大了
如果你说的是Max2的话,我上周买的,哈哈,屏幕非常非常大。
6.44寸超大屏幕,5300毫安电池,玩2天不用充电。
缺点:
1. CPU寒碜了点,不过玩农药不卡。不发热。
2. 只能用T-mobile卡,不能4G,只能3G. 可能网速慢点,不过还好,玩游戏网速不卡。
250刀,很值。
c*********e
发帖数: 774
21
你是狗家清洁工?没常识也不会验证?
你去booking找找,欧洲twin room 2个床 max 2,double room 1个床,max 2.
tripleroom少之又少
这个generator stockholm根本没有tripleroom,有twin,double和quadruple max2和4
google整天都是这么造谣传谣的吗。
Y****a
发帖数: 17170
22
来自主题: Automobile版 - 版上用Radar Detector的多吗?
MAX2 HD
很好用。
j***f
发帖数: 3610
23
来自主题: Automobile版 - 版上用Radar Detector的多吗?
用 escort max2 不错,很fancy
s*******t
发帖数: 248
24
来自主题: JobHunting版 - amazon一面面经
Thanks for sharing.
It seems to me that your code is not right.
Suppose the array is monotonic increasing, I think max2 will remain as the I
NT_MIN, only max1 updates each time you call elect().
Please correct me if I am wrong.
i*****e
发帖数: 113
25
来自主题: JobHunting版 - amazon一面面经
Thanks a lot! The function elect() has problem, it should update both max1 and max2.
BTW, I don't know you guys how to process the phone silent when writing code
on your paper. I always rush to write it out and read it to interviewer,
just being afraid of that the phone keep silent. And in case the interviewer
think: "hum, this guy takes too long time to write the simple function". It
takes me around 2 minutes to finish this function. After I finished a
skeleton, I began reading it and changed t
o****o
发帖数: 1398
26
如果没有准备过,估计很多人面试遇到位运算的题目都会头疼,包括我自己,所以在此
总结一下位运算相关题目吧,从leetcode,careercup还有本版学到的,留个纪念:
1. Toggle 5th-8th bit of a 32bit Integer 这是我自己编的题,不过对于理解XOR操
作有帮助
Ans: a = a ^ 0x000000F0;
2. 交换第i与第j位
这个思路是直接:抠出第i位和第j位,交换之后再置位,可是实现比较麻烦啊,分情况
考虑比较好:
(1)如果第i位和第j位相同,不用换
(2)如果不同,用题1的方法,来个掩码,仅toggle第i位和第j位
Ans:
//Assume i,j start from 0
int exchange(int a, int i, int j) {
if( ((a>>i)&1) != ((a>>j)&1) ) {
a = a ^ ((1< }
return a;
}
3. Turn off the rightmost 1-bit
Ans: x = x & (x-1)... 阅读全帖
s********n
发帖数: 62
27
来自主题: JobHunting版 - 为什么waze 很多假的alarm? (转载)
所以得用Escort Max2
M*******0
发帖数: 1502
28
来自主题: Pingpong版 - 试打: YES+海夫
谢了!
去了国内网站一看,卖的都是max2.2,根本就不卖2.0。
又老土了!不过。。。。。。
我再打几次,实在不爽再换吧,要换双面都得换吧?担心换上2.2之后,球拍太重、太
厚了。
i****n
发帖数: 109
29
来自主题: ZJU版 - 重回浙大(六)
重逢
上了一段台阶,我们进了八舍,虽然只比原来住的七舍“大”一号,不过由于
地理位置相隔太远,所以这次还是第一次进八舍。进了同学的寝室,里面另外两位
原来其他班同学热情的招呼道“你们来啦”,很随和、亲切的感觉,我们也高兴的
应着,说着一些寒暄的话。斜对面的宿舍里住着同学YoungKee,正坐在床上摆弄电
脑呢。初一看,只觉得这台电脑好熟悉哦,样子旧旧的,键盘脏脏的,intel inside
和pentium的标签还贴在机箱上,翘起来的那只角黑黑的,却一时间想不起来了。
Young看到我看这台电脑时奇怪的眼神,不禁笑起来“不认识啦?这就是你们的电
脑啊!”原来竟然是陪伴我们过了两年半的那台133!分别仅仅两个多月,我就认
不出来了,我喃喃的说“现在还能能用”,看着这台机器,形象顿时更加清晰了,
虽然机箱的外壳已经出现了岁月的锈迹,那部GOLDSTAR 8X光驱已经变得分外挑剔
弄得我买张D版光盘经常要去EM(电子市场)跑两三趟,键盘的按键越来越生硬,
97年春天买回的的时候可以笑傲七舍南的配置现在连一个3DS MAX2.5和FIFIA99都
吭哧吭哧跑不动,:((,但是这台PC改
d*b
发帖数: 21830
30
来自主题: Hardware版 - 急问!!!有懂FPGA的高手吗?
这个太简单了,你可以用verilog写,Xilinx的也可以用labview,直接拉拉icon就可以
了, 不过具体的我只用过Altera的,还是Max2

push
button
1 2 3 4 下页 末页 (共4页)