z****o 发帖数: 78 | 1 存储city之间的距离的题目,可以有一下两个假设:
1. city1 到 city2 = city2 到 city1
2. city1 到 city2 距离是非负的。
这样的话,可以计算 cityi 到 cityj 的最短路径的边集S(i,j) = { e1,e2,e3..}
S = S(0,1) U S(0,2) U S(0,3) ..... U S(1,2) U S(1,3) U ..... U S(i,i+1) U S
(i,i+2) U ...
最后存下来S就可以了。这种存法的空间是 |S|*( 2*sizeof(int) + 1* sizeof(double
) );
这个空间去和 ((n-1)+(n-2)+(n-3)+...+2+1)*sizeof(double) 的矩阵存法比较一下,用
空间使用比较省的一种来存。|S|够小的时候用第一种比较好,比如所有的city在一条
线上。
|S|不小的时候用第二种比较省,比如city均匀分布在圆上。 |
|
g**e 发帖数: 6127 | 2 我先来一个吧,如果有人面试碰到了请给我包子。
假设有一堆海量数据,每一条信息的内容如下
e.g.
查询条件大概是这样的:
... 阅读全帖 |
|
P******X 发帖数: 482 | 3 并且专门重温了一遍sin city 1(真是好电影!)
frank miller 最失败的大概是当年没认识到Marv这个人物的价值。Marv在sin city1里
的那个故事,the hard goodbye好像是当年漫画出版时的第一个大故事。frank miller
心目中的Marv大概是sin city 2中Just Another Saturday Night里的Marv,或者是那个
抠那个大个眼珠的Marv。而实际上看了sin city 1的观众心目中的Marv是大胆无敌,不
守规矩但忠肝义胆,有勇有谋诛杀变态Kevin的大英雄。frank miller大概是听说后才
给Marv在sin city2中安拍了很多戏份。可惜人物塑造完全没有脱出他几十年前的漫画
,没有研究sin city 1爱好者想要看什么。太失败了!
sin city 2里由joseph,那个dark knight3里的配角演的那两个赌钱的故事要表现什么
?看了半天只觉得突出了senator roark。结果是如果说sin city1演活了Marv,那sin
city2演活了senator roark这个角色。比... 阅读全帖 |
|
|
s*f 发帖数: 1071 | 5 湾区和多伦多消费差远了。
https://www.numbeo.com/cost-of-living/compare_cities.jsp?country1=Canada&
city1=Toronto&country2=United+States&city2=San+Francisco%2C+CA
You would need around 8,050.95$ in San Francisco, CA to maintain the same
standard of life that you can have with 3,952.91$ (5,400.00C$) in Toronto (
assuming you rent in both cities). This calculation uses our Cost of Living
Plus Rent Index to compare cost of living. This assumes net earnings (after
income tax). You can change the amount in this c... 阅读全帖 |
|
v*********u 发帖数: 10464 | 6 弯曲太吓人了,以后通了高铁,就住在俄勒冈州,每天往返硅谷上班也很快,哈哈哈
[在 smf (smf) 的大作中提到:]
:湾区和多伦多消费差远了。
:https://www.numbeo.com/cost-of-living/compare_cities.jsp?country1=Canada&
:city1=Toronto&country2=United+States&city2=San+Francisco,+CA
:You would need around 8,050.95$ in San Francisco, CA to maintain the same
:standard of life that you can have with 3,952.91$ (5,400.00C$) in Toronto (
:assuming you rent in both cities). This calculation uses our Cost of Living
Plus Rent Index to compare cost of living. This assumes net... 阅读全帖 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
l*********n 发帖数: 303 | 20 你住的、包括你中国同事住的这些town,到jersey city1小时差不多吧?你们是自己开
车,公共交通怎么过去? |
|
|
f*******r 发帖数: 5301 | 22 即使楼主base不低 也可以具体算一算
假设楼主现收入100,其中25交了税,触及AMT,实际收入75
搬到加州,收入134,其中13.4养了老墨,联邦税比以前的25又要多交34*0.3645=
12.4,实际收入134-13.4-25-12.4=83.2
新旧收入比83.2/75=110.9%
如果看两地的消费指数
http://www.bestplaces.net/col/?salary=150000&city1=54835000&cit
湾区比TX生活消费贵89% 住房更是贵300%以上 工资只涨10.9% 来了不能说要饭 生活质
量要下降一倍 要想保持生活质量 工资确实要加倍才差不多 就算工资加倍 折腾半天还
是跟以前一样 又图了什么呢 是地震的刺激还是缴枪的顺从感? |
|
|
|
|
e********r 发帖数: 353 | 26 我这长周末每天都去北新浙西钓trout,离new york city1小时,靠近78,想去的话站内
PM我。 |
|
|
|
|
s*******i 发帖数: 85 | 30 你的这几个,只有made of honor没看过。
Valentine's day拍得,哎,整个情节支离破碎,枝节太多。不过印象中,有几个小设
计还挺好的,一个是Julia Roberts原来是探望自己的儿子;而与她同飞机的,却是个
gay,去看自己的partner。
He is not that into you,也是类似的问题。
Love Actually虽然故事线也一样多,但好在很多小故事,本身还挺吸引人的。
这里面最喜欢the Holiday和BJ单身日记。前者是因为Jude Law很帅,而且那么傻的浪
漫情节,还把我给看哭了。BJ1挺新鲜的,BJ2就俗了。
Sex and the City1 & 2,基本把电视剧给毁了。和电视剧里的人物性格都不连贯。台
词一点都不精警。
西雅图未眠夜,大概是电视里放了太多次的原因,已经看到没感觉了。 |
|
|
|
|
|
d*********r 发帖数: 813 | 35 完全理解您对巴尔地摩第二故乡的朴素的乡土感情。厚木吾德北边的那片公寓一般租金
都比较贵吧?我认识的兄弟姐妹没有一个住那边的。
另外,巴尔地摩跟费城的犯罪率基本上是半斤八两么。Property Crime还高了俩
个点的指标:
http://www.bestplaces.net/crime/?city1=52404000&city2=54260000
Crime Rates Philadelphia, Pennsylvania Baltimore, Maryland United
States
Violent Crime 8 7 3
Property Crime 6 8 3
The crime indices range 1-10. A higher number corresponds with more crime.
Our crime rates are based on FBI data.
对于新生来讲,咱把巴尔地摩的实际情况一五一十地讲清楚了有好处,免得到时候来了
不适应,culture shock太强烈。不过咱老中一般适应 |
|
|
f*****a 发帖数: 693 | 37 1. the macro variables CITY1 through CITY10 contain the respective values
Cary, New York, Chicago, Los Angeles, Austin, Boston, Orlando, Dallas,
Knoxville, and Asheville:
%macro listthem;
%do n=1 %to 10; &&city&n
%end;
%mend listthem;
%put %listthem;
Q: Why ";" is not needed after &&city&n ?
2. Sorry, no data for this one:
%macro sepfeature;
%do i=1 %to &n;
data &&type&i (drop=type);
set features;
***********************************
if type="&&type&i";
***********************************
r |
|
b******e 发帖数: 539 | 38 For your first question:
if you put ';' there, in the intermediate step, your code resolves to
something like:
%put &&city1; &&city2; ...; &&city10;;
which is an invalid statement after the first ';' |
|