s********t 发帖数: 930 | 1 【 以下文字转载自 USANews 讨论区 】
发信人: starlightt (星光少女), 信区: USANews
标 题: 川普谈判的艺术相当的random:给钱!
发信站: BBS 未名空间站 (Sat Jan 28 00:50:17 2017, 美东)
不给。
川普:加你关税!
滚蛋。
川普:喔,那就算了吧。 |
|
g****g 发帖数: 1267 | 2 怎么可能random一块把夫妇俩一起挑出来了?难道现在还有夫妻票吗 |
|
|
h********n 发帖数: 15 | 4 Random thoughts on the passing scene:
The next time a member of the British royal family gets married, I hope they
elope and spare us all another 24/7 media orgy.
Does the "not guilty" verdict in the Casey Anthony child murder trial mean
that the jury succumbed to the confusion between "beyond a reasonable doubt"
and "beyond any conceivable doubt"? The word "reasonable" is not put in
there just for decoration.
We seem to be living in an age when nobody can be bothered to answer their
telephone, ... 阅读全帖 |
|
l****z 发帖数: 29846 | 5 04/10/2012
Random thoughts on the passing scene:
How long do politicians have to keep on promising heaven and delivering hell
before people catch on, and stop getting swept away by rhetoric?
Why should being in a professional sport exempt anyone from prosecution for
advocating deliberate violence? Recent revelations of such advocacy of
violence by an NFL coach should lead to his banishment for life by the NFL,
and criminal prosecution by the authorities. If you are serious about
reducing v... 阅读全帖 |
|
N*****N 发帖数: 1605 | 6 ☆─────────────────────────────────────☆
yayaliu (hero) 于 (Thu Jun 14 23:17:51 2007) 提到:
3 per store on random days --hard to get
TRU today: I called all the 4 nearby TRU, 2 have wii, 2 don't, I think the
other 2 will get them by Sunday
TRU is veli clear on the 1 per customer policy..跟PPMM套磁失败。。。555
buying the 海盗GAME GET $10 GC
☆─────────────────────────────────────☆
mir (rebates) 于 (Thu Jun 14 23:19:01 2007) 提到:
then return the game?
dd, jjdd
btw, returned the game come from the online |
|
|
l*********2 发帖数: 5575 | 8 人人网上转的状态:
芝加哥黑帮开始全城random kill...大家出门注意安全...消息说是由于警方出动400+
警力扫黄打黑激怒黑帮导致警匪不平衡黑帮因此暴动....新闻链接: http://rrurl.cn/ijNJ0O |
|
|
|
z****l 发帖数: 687 | 11 Maybe you should call him randomly? Ask him whether your idea works well
then hang up?
ask |
|
|
b*********n 发帖数: 464 | 13 仍旧是n^2吧,那randomized有啥用呢?仅仅为了已经排序的序列? |
|
y****n 发帖数: 579 | 14 randomized之后对于所有序列的时间复杂度期望都是n*lg(n). |
|
i*o 发帖数: 149 | 15 randomization is meant to reduce the possibility of occurrence of worst case
scenario.
worst case complexity is still n^n |
|
h**k 发帖数: 3368 | 16 对randomized 算法,讨论worst case意义不大,一般都是只看expected complexity |
|
p**********e 发帖数: 13 | 17 看到同一个中心的其他case都处理的很快,也想着早点去上班,上周一请学校国际学生
帮公司发email加急OPT。结果,今天收到uscis邮件说,我的case被random security
check. 学校说他们也没遇到过这个情况,也不知道要多久处理,这在我们学校是头一
次。想请问,有谁遇到过这样的情况么,这个check需要多久啊?any information is
welcome..thanks |
|
|
c****p 发帖数: 6474 | 19 for(i=0;i<54;i++)
{
r = rand(54); // get a random number between 0~53, inclusive.
swap(card,i,rand(r));
} |
|
c*******r 发帖数: 309 | 20 Given an array of random numbers. Find the longest consecutive sequence.
For ex
Array 100 3 200 1 2 4
Ans 1 2 3 4
Array 101 2 3 104 5 103 9 102
Ans 101 102 103 104
Can we do it in one go on array using extra space??
我想到的方式是先sort, 然后用index来存,然后记录max长度. 不断更新新的index指
针.
不过据说复杂度要控制在o(n).
没什么好的想法啊 |
|
A**u 发帖数: 2458 | 21 什么是 copy random link.
完全看不懂啊
珠相连)。 |
|
f*******t 发帖数: 7549 | 22 应该是扫描3遍吧
1.在每个节点后面插入一个复制的结点
2.修改所有复制结点的random指针
3.拆分出新的链表 |
|
A**u 发帖数: 2458 | 23 我都晕了
next一遍
random一遍
还不够吗? |
|
d*******d 发帖数: 2050 | 24 好吧,我写个copy random graph的通解,对一切graph,tree,list什么的都有效。
区别是O(n)space 复杂度。可以拿来救场。
标准list copy应该是O(n) time, O(1) space.
假设hash class, equal class已经定义好了。
Node * copy(Node * root, unordered_map & rec){
if(root == 0)
return 0;
unordered_map::iterator it = rec.find(root);
if( it != rec.end()){
return it->second;
}else{
Node * newnode = new Node(root);// a new node, copy data
rec.insert(make_pair( root, newnode));
// then copy each ... 阅读全帖 |
|
l***i 发帖数: 1309 | 25 This seems a nice idea, but one question, when you process a node, how do
you know if its random pointer has been reversed already, without marking
each node that you have done reverse?
c
->
nodeEnd |
|
D********g 发帖数: 650 | 26 This is a pretty tricky question, especially for the loop handling. Here is
my java code, tested with looped case and non-looped case.
public static class DLLNode {
DLLNode prev;
DLLNode next;
int value;
public DLLNode(int value) {
this.value = value;
prev = null;
next = null;
}
}
static DLLNode dummy = new DLLNode(-1);
static DLLNode loopDummy = new DLLNode(-2);
static void printLL(final DLLN... 阅读全帖 |
|
l*********8 发帖数: 4642 | 27 网上看到的G家题目:
What is the best way to choose a random value in a stream? Given that each
of them has a chance of occurring equally。
我一点儿思路都没有。 不就是随便选吗? |
|
g***s 发帖数: 3811 | 28 max_v = 0;
for i = 1 to n{
if (weight[i] > max_v) {
sum = sum * (max_v / weight[i]) ;
max_v = weight[i];
}
sum += weigh[i] / max_v;
if ( random(1) <= ( (weight[i]/max_v) / (sum) )
r = a[i];
}
return r;
max_v is alway the max value of weigh [0..i]
sum <= i |
|
g***s 发帖数: 3811 | 29 max_v = 0;
for i = 1 to n{
if (weight[i] > max_v) {
sum = sum * (max_v / weight[i]) ;
max_v = weight[i];
}
sum += weigh[i] / max_v;
if ( random(1) <= ( (weight[i]/max_v) / (sum) )
r = a[i];
}
return r;
max_v is alway the max value of weigh [0..i]
sum <= i |
|
a*******y 发帖数: 1040 | 30 wiki reservoir sampling
basically you have to have a random() function to generate from 1 to i where
i is the count of the line you have seen so far, if it fall between 1 and k
, you replace that one, otherwise, drop this one |
|
J*******n 发帖数: 2901 | 31 我被问过怎么写一个function来assess random number generator,open question,
我不懂什么伪随机数和真随机数的概念,当时完全靠常识来讨论回答的 |
|
|
j******2 发帖数: 362 | 33 请问这题的count(i)究竟咩意思?
二爷为何说这题跟O(1) add(), del(), rand() data structure 那题一样?恕愚钝。
难道是:用random产生0到size()间的整数i,然后遍历整个set,凡count(j)>count(
i)的,delete之并存之。然后delete(i)。最后把delete的其他数又insert进去。
感觉很不efficient但是题目不要求complexity的话也可以。 |
|
l*****a 发帖数: 14598 | 34 把题目说清楚点,不要道听途说的题都拿出来
另外,数据结构相关题目提到random access,都是用数组index访问
跟概率无关 |
|
x*******1 发帖数: 28835 | 35 Write a java method to randomly sample 1% of stream objects |
|
m****9 发帖数: 492 | 36 或者说用randomized的方法来解是不是不好解释清楚? |
|
d****n 发帖数: 233 | 37 You need to have 3 while loops, the second one fix the random pointer and
the third one separate old list and new list. |
|
J****3 发帖数: 427 | 38 第二个while loop 判断 pointer.random |
|
s*w 发帖数: 729 | 39 一时没想起来最佳做法,用了个笨点的办法
第一个循环:用原表的 next 指针,copy 节点到新表,同时存两个表各自的 index 到
node* 的对应
第二个循环:用原表的 random 指针,建立第一个表里 index 到 index 的对应
第三个循环:用前两个循环的结果更新新表
30分钟写完,调了10分钟,期间一个compiler error, 两个 run time error (
vector忘记用push_back 直接[]了,一个变量写错),一个错误(新表尾部加新node忘
记更新尾指针),然后就 ac 了,难道现在没 lte 了? |
|
a**********0 发帖数: 422 | 40 意见很中肯
不过我已经通过了
你说的我改掉了
random |
|
a**********0 发帖数: 422 | 41 我的问题不是classification 而是regression 所以需要由regression tree构成的
random forest 不知道weka有没有 |
|
d********m 发帖数: 101 | 42 Randomized algorithms.
Parallel algorithms.
Distributed algorithms.
NP-completeness of particular problems.
Approximation algorithms
这块有必要学吗? |
|
y***n 发帖数: 1594 | 43 有一列key,每个key有其对应的数值,要求写一个random的函数,key大的返回的概率
也大
这个是什么意思? |
|
m*********a 发帖数: 3299 | 44 把每个key加起来,产生对应的random数,然后按key的大小选key
5,10,20key
产生0到35的随机数
随机数<5,return 5
15>x>=5 return 10
35>x>=15 return 20 |
|
y***n 发帖数: 1594 | 45 有一列key,每个key有其对应的数值,要求写一个random的函数,key大的返回的概率
也大
这个是什么意思? |
|
m*********a 发帖数: 3299 | 46 把每个key加起来,产生对应的random数,然后按key的大小选key
5,10,20key
产生0到35的随机数
随机数<5,return 5
15>x>=5 return 10
35>x>=15 return 20 |
|
f**********t 发帖数: 1001 | 47 // 有一列key,每个key有其对应的数值,要求写一个random的函数,key大的返回的概
率也大
class RandomBiase {
vector> _vu;
public:
RandomBiase(const vector> &in) {
unsigned sum = 0;
for (auto x : in) {
sum += x.second;
_vu.push_back(make_pair(x.first, sum));
}
}
char Next() {
unsigned n = rand() % _vu.back().second;
auto it = lower_bound(_vu.begin(), _vu.end(), make_pair('#', n),
[](const pair &x, const pair &y... 阅读全帖 |
|
a*****0 发帖数: 3319 | 48 请问random orbit sander Bosch ROS20VSK (HD sells) 和ROS20VSC (lowes sells)
有什么区别?多谢。 |
|
|
|