Redian新闻
>
为什么有人把自己的脑残pa帖子转到joke?
avatar
为什么有人把自己的脑残pa帖子转到joke?# Joke - 肚皮舞运动
s*e
1
Given a matrix, each element is either s(start), a(availbe), b(block).
There are many s in the matrix,
compute the shortest path of each a(availbe) element.
distance from s or a to ajacent element is 1。
from s or a to b(block) is +ulimited.
compute the shortest distance from a(available) element to all s (start)
node
for exmaple.
s a a a s
the result would be
0 1 2 1 0
for
s b s b s
a b a b a
a b a b a
a a a a a
the result would be
0 + 0 + 0
1 + 1 + 1
2 + 2 + 2
3 4 3 4 3
avatar
l*n
2
除了Walter action 中国造,还有别的件是中国造的吗?你觉得Renner Action和
Walter action区别大吗 (是便宜一些)? 另 Walter action 是中国哪个厂出的?
avatar
I*t
3
是觉得自己算joke?还是觉得自己pa别人算joke?抑或是觉得自己把自己pa别人的帖子
转来这个行为本身算joke?难不成是发现自己在真实世界的存在就已经是joke了于是抱
着宁可把自己网络上的ID也变成joke也要让世界变得更加像个joke的想法于是把一点都
不好笑的joke转到joke版?
avatar
B*1
4
我的第一想法是
方法1:
根据矩阵建立一个adj matrix,
然后对每一个s,跑dijkstra,算到每一个a的最短距离,
对于每一个a,如果新的s算出来的最短距离更加小,就更新它的最短距离。
方法2:
建立adj matrix
跑flyoyd- warshal, 算每2点之间最短距离,
对每一个a,找到所有s的距离中最小的那一个。
avatar
l*n
5
仅存的三个美国手工品牌之一。

【在 l***n 的大作中提到】
: 除了Walter action 中国造,还有别的件是中国造的吗?你觉得Renner Action和
: Walter action区别大吗 (是便宜一些)? 另 Walter action 是中国哪个厂出的?

avatar
b*y
7
一开始所有a的值+infty,s的值为0.
然后对每个s开始广播距离(bfs),然后update a的值(也就是距离)
如果a的值没有update,就没必要继续广播下去了。

【在 s******e 的大作中提到】
: Given a matrix, each element is either s(start), a(availbe), b(block).
: There are many s in the matrix,
: compute the shortest path of each a(availbe) element.
: distance from s or a to ajacent element is 1。
: from s or a to b(block) is +ulimited.
: compute the shortest distance from a(available) element to all s (start)
: node
: for exmaple.
: s a a a s
: the result would be

avatar
r*s
8
mark
avatar
D*e
9
我也这样想的。对每个S做BFS。对每个A,如果算出来的新的距离比原来的小,就更新。跟Bayesian1
说的跑Dijskra是一样的。
如果把所有S放在一起看作一个S做BFS,可能会快,能证明正确性吗?

【在 b*******y 的大作中提到】
: 一开始所有a的值+infty,s的值为0.
: 然后对每个s开始广播距离(bfs),然后update a的值(也就是距离)
: 如果a的值没有update,就没必要继续广播下去了。

avatar
m*q
10
把所有s放在一起是个好主意,直观上应该是正确的

新。跟Bayesian1

【在 D*******e 的大作中提到】
: 我也这样想的。对每个S做BFS。对每个A,如果算出来的新的距离比原来的小,就更新。跟Bayesian1
: 说的跑Dijskra是一样的。
: 如果把所有S放在一起看作一个S做BFS,可能会快,能证明正确性吗?

avatar
u*q
11
Since the distance is 1 everywhere for s, a. Any a will be updated with the
shortest distance the first time it's visited. So start from all s should
work.

【在 m**q 的大作中提到】
: 把所有s放在一起是个好主意,直观上应该是正确的
:
: 新。跟Bayesian1

avatar
D*e
12
Agree

the

【在 u***q 的大作中提到】
: Since the distance is 1 everywhere for s, a. Any a will be updated with the
: shortest distance the first time it's visited. So start from all s should
: work.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。