0%

题目

There is a table World

1
2
3
4
5
6
7
8
9
+-----------------+------------+------------+--------------+---------------+
| name | continent | area | population | gdp |
+-----------------+------------+------------+--------------+---------------+
| Afghanistan | Asia | 652230 | 25500100 | 20343000 |
| Albania | Europe | 28748 | 2831741 | 12960000 |
| Algeria | Africa | 2381741 | 37100000 | 188681000 |
| Andorra | Europe | 468 | 78115 | 3712000 |
| Angola | Africa | 1246700 | 20609294 | 100990000 |
+-----------------+------------+------------+--------------+---------------+

A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million.

Write a SQL solution to output big countries’ name, population and area.

For example, according to the above table, we should output:

1
2
3
4
5
6
+--------------+-------------+--------------+
| name | population | area |
+--------------+-------------+--------------+
| Afghanistan | 25500100 | 652230 |
| Algeria | 37100000 | 2381741 |
+--------------+-------------+--------------+
难度

Easy

方法

没想到LeetCode有这么简单的题,直接写sql即可

sql
1
2
# Write your MySQL query statement below
select name, population, area from world where area > 3000000 or population > 25000000;

题目

Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings.

You need to help them find out their common interest with the least list index sum. If there is a choice tie between answers, output all of them with no order requirement. You could assume there always exists an answer.

Example 1:

1
2
3
4
5
Input:
["Shogun", "Tapioca Express", "Burger King", "KFC"]
["Piatti", "The Grill at Torrey Pines", "Hungry Hunter Steakhouse", "Shogun"]
Output: ["Shogun"]
Explanation: The only restaurant they both like is "Shogun".

Example 2:

1
2
3
4
5
Input:
["Shogun", "Tapioca Express", "Burger King", "KFC"]
["KFC", "Shogun", "Burger King"]
Output: ["Shogun"]
Explanation: The restaurant they both like and have the least index sum is "Shogun" with index sum 1 (0+1).

Note:

  1. The length of both lists will be in the range of [1, 1000].
  2. The length of strings in both lists will be in the range of [1, 30].
  3. The index is starting from 0 to the list length minus 1.
  4. No duplicates in both lists.
难度

Easy

方法

minSum保存最小的索引和,用一个dict记录list1中每个单词对应的索引序号。遍历list2,将值存入word中,计算wordlist1list2中的索引和,如果小于minSum,则替换minSum,并清空结果list,加入该word,如果==minSum,则直接加入word

python代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import sys

class Solution(object):
def findRestaurant(self, list1, list2):
"""
:type list1: List[str]
:type list2: List[str]
:rtype: List[str]
"""
list1Map = {}
i = 0
for word in list1:
list1Map[word] = i
i += 1

minSum = sys.maxint
i = 0
restaurants = []
for word in list2:
if word in list1Map:
if minSum > list1Map[word]+i:
print minSum
minSum = list1Map[word]+i
restaurants = []
restaurants.append(word)
elif minSum == list1Map[word]+i:
restaurants.append(word)
i += 1

return restaurants

assert Solution().findRestaurant(["Shogun", "Tapioca Express", "Burger King", "KFC"],
["Piatti", "The Grill at Torrey Pines", "Hungry Hunter Steakhouse", "Shogun"]) == ["Shogun"]
assert Solution().findRestaurant(["Shogun", "Tapioca Express", "Burger King", "KFC"],
["KFC", "Shogun", "Burger King"]) == ["Shogun"]
assert Solution().findRestaurant(["Shogun","Tapioca Express","Burger King","KFC"],
["KFC","Burger King","Tapioca Express","Shogun"]) == ["KFC","Burger King","Tapioca Express","Shogun"]

How did Vera discover she had this gift of second sight?

Several cases have been reported in Russia recently of people who can read and detect colours with their fingers, and even see through solid doors and walls. One case concerns an eleven-year-old schoolgirl, Vera Petrova, who has normal vision but who can also perceive things with different parts of her skin, and through solid walls. This ability was first noticed by her father. One day she came into his office and happened to put her hand on the door of a locked safe. Suddenly she asked her father why he kept so many old newspapers locked away there, and even described the way they were done up in bundles.

Vera’s curious talent was brought to the notice of a scientific research institute in the town of Ulyanovsk, near where she lives, and in April she was given a series of tests by a special commission of the Ministry of Health of the Russian Federal Republic. During these tests she was able to read a newspaper through an opaque screen and, stranger still, by moving her elbow over a child’s game of Lotto she was able to describe the figures and colours printed on it; and, in another instance, wearing stockings and slippers, to make out with her foot the outlines and colours of a picture hidden under a carpet. Other experiments showed that her knees and shoulders had a similar sensitivity. During all these tests Vera was blindfold; and, indeed, except when blindfold she lacked the ability to perceive things with her skin. It was also found that although she could perceive things with her fingers this ability ceased the moment her hands were wet.

📖 文章大意

这是一篇关于超自然能力的报道,讲述了俄罗斯11岁女孩维拉·彼得罗娃(Vera Petrova)拥有用皮肤”看见”事物的特殊能力。

🔍 故事梗概

维拉的特殊能力

  • 正常视力 + 皮肤感知能力
  • 可以透过实心墙壁和门”看见”物体
  • 能用身体不同部位(手指、肘部、膝盖、肩膀、脚)感知颜色和形状

能力的发现过程

第一次发现(父亲的办公室):

  • 维拉无意中把手放在父亲办公室的保险柜门上
  • 突然问父亲为什么锁着这么多旧报纸
  • 甚至描述出报纸是如何捆扎的

🔬 科学测试

维拉被带到乌里扬诺夫斯克的科研机构接受测试:

测试项目及结果:

  1. 透过不透明屏幕读报纸
  2. 用肘部感知儿童乐透游戏
    • 能描述印刷的图案和颜色 ✓
  3. 穿着袜子和拖鞋,用脚感知
    • 辨认出地毯下隐藏图片的轮廓和颜色 ✓
  4. 膝盖和肩膀也有类似敏感度

重要条件:

  • ⚠️ 必须蒙眼:不蒙眼时这种能力就消失
  • ⚠️ 手必须干燥:手湿了能力就失效

📝 关键词汇解释

单词 含义 在文中的用法
vision 视力 正常视力
perceive 感知、察觉 用皮肤感知事物
bundles 捆、束 报纸捆扎的方式
institute 研究所 科研机构
Ministry 部(政府部门) 卫生部
opaque 不透明的 不透明的屏幕
slippers 拖鞋 穿着拖鞋测试
carpet 地毯 地毯下藏着图片
blindfold 蒙眼的 测试时必须蒙眼

💡 文章主题

这是一篇科学报道类文章,探讨了:

  • 超感官知觉(ESP)现象
  • 人体潜在的未知能力
  • 科学验证超自然现象的尝试

What was the main objective of early mountain climbers?

Modern alpinist try to climb mountains by a route which will give them good sport, and the more difficult it is, the more highly it is regarded. In the pioneering days, however, this was not the case at all. The early climbers were looking for the easiest way to the top, because the summit was the prize they sought, especially if it had never been attained before. It is true that during their explorations they often faced difficulties and dangers of the most perilous nature, equipped in a manner which would make a modern climber shudder at the thought, but they did not go out of their way to court such excitement. They had a single aim, a solitary goal — the top!

It is hard for us to realize nowadays how difficult it was for the pioneers. Except for one or two places such as Zermatt and Chamonix, which had rapidly become popular, Alpine villages tended to be impoverished settlements cut off from civilization by the high mountains. Such inns as there were generally dirty and flea-ridden; the food simply local cheese accompanied by bread often twelve months old, all washed down with coarse wine. Often a valley boasted no inn at all, and climbers found shelter wherever they could sometimes with the local priest(who was usually as poor as his parishioners), sometimes with shepherds or cheese-makes. Invariably the background was the same: dirt and poverty, and very uncomfortable. For men accustomed to eating seven-course dinners and sleeping between fine linen sheets at home, the change to the Alps must have been very hard indeed.

📖 Lesson 03: Matterhorn Man 深度解析

🎯 文章主旨

What was the main objective of early mountain climbers?

答案:到达顶峰(reaching the summit/top)

早期登山者的唯一目标就是登顶,尤其是征服从未有人到达过的山峰。他们寻找最容易的路线,而不是像现代登山者那样追求高难度挑战。


📝 第一段:登山理念的今昔对比

原文分析

1
2
3
Modern alpinists try to climb mountains by a route which 
will give them good sport, and the more difficult it is,
the more highly it is regarded.

翻译:
现代登山者试图通过能给他们带来良好运动体验的路线攀登山峰,
路线越困难,就越受推崇。

核心观点:现代登山 = 追求挑战

1
2
3
4
5
现代登山者的价值观:
难度 ↑ = 荣誉 ↑
- 选择最难的路线
- 挑战极限
- 证明技术和勇气

1
In the pioneering days, however, this was not the case at all.

翻译:
然而,在开拓时期,情况完全不是这样。

转折词 “however” 引出对比


1
2
3
The early climbers were looking for the easiest way to the top,
because the summit was the prize they sought, especially if
it had never been attained before.

翻译:
早期登山者寻找的是到达顶峰最容易的路线,因为山顶才是他们
追求的奖赏,尤其是如果那座山从未有人登顶过。

早期登山者的价值观:

1
2
3
4
5
6
7
8
9
10
目标 = 登顶(首次征服)
手段 = 最容易的路线

比喻:
现代:攀岩比赛(看谁技术好)
早期:探险竞赛(看谁先到)

就像:
现代:马拉松选手追求最快时间
早期:探险家只想到达南极点

1
2
3
4
5
It is true that during their explorations they often faced 
difficulties and dangers of the most perilous nature,
equipped in a manner which would make a modern climber
shudder at the thought, but they did not go out of their
way to court such excitement.

翻译:
确实,在探险过程中,他们经常面临极其危险的困难和险境,
装备简陋到会让现代登山者想想都发抖,但他们并不是
刻意去追求这种刺激。

关键词解析:

  • perilous /ˈperələs/:极其危险的
  • shudder /ˈʃʌdər/:颤抖、战栗
  • court:追求、招致(court danger = 自找危险)
  • go out of one’s way to do:特意去做、刻意做

理解:

1
2
3
4
5
6
7
8
9
10
11
早期登山者:
✅ 会遇到危险(客观存在)
❌ 不是为了追求危险(主观意愿)

装备对比:
早期:基本绳索、简陋工具
现代:专业冰镐、安全带、氧气瓶等

态度对比:
早期:危险是达成目标的代价
现代:危险本身就是目标的一部分

1
They had a single aim, a solitary goal — the top!

翻译:
他们只有一个目标,一个唯一的目标——登顶!

修辞手法:

  • 重复强调:single aim, solitary goal
  • 破折号:加强语气
  • 感叹号:表达决心

solitary /ˈsɑːləteri/:

  • 唯一的、单独的
  • 强调”只有这一个,别无其他”

📝 第二段:早期登山的艰苦条件

原文分析

1
2
It is hard for us to realize nowadays how difficult it 
was for the pioneers.

翻译:
我们现在很难想象当年开拓者们有多么艰难。

写作手法:

  • 引起读者共鸣
  • 为后文铺垫

1
2
3
4
Except for one or two places such as Zermatt and Chamonix, 
which had rapidly become popular, Alpine villages tended
to be impoverished settlements cut off from civilization
by the high mountains.

翻译:
除了策尔马特和夏蒙尼这一两个迅速变得热门的地方,
阿尔卑斯山区的村庄往往是被高山与文明世界隔绝的
贫困定居点。

地理背景:

1
2
3
4
5
6
7
8
9
10
Zermatt(策尔马特):
- 瑞士著名滑雪胜地
- 马特洪峰(Matterhorn)脚下
- 现在:豪华度假村
- 当时:少数几个发展起来的村庄

Chamonix(夏蒙尼):
- 法国阿尔卑斯山区
- 勃朗峰(Mont Blanc,欧洲最高峰)脚下
- 1924年第一届冬奥会举办地

关键词:

  • impoverished /ɪmˈpɑːvərɪʃt/:贫困的
  • settlements:定居点
  • cut off from:与…隔绝

理解:

1
2
3
4
5
6
大部分山村的状况:
❌ 交通不便(高山阻隔)
❌ 经济落后(贫困)
❌ 与外界隔绝(信息闭塞)

只有极少数地方因为登山热而发展起来

1
2
3
Such inns as there were generally dirty and flea-ridden; 
the food simply local cheese accompanied by bread often
twelve months old, all washed down with coarse wine.

翻译:
那里仅有的客栈通常又脏又满是跳蚤;食物只是当地奶酪
配上常常已有一年之久的面包,全都用粗劣的葡萄酒冲下去。

语法点:

1
2
Such inns as there were = The inns that existed
(倒装句,强调"仅有的那些客栈")

关键词:

  • flea-ridden:满是跳蚤的

    • flea /fliː/:跳蚤
    • -ridden:充满…的(pest-ridden = 害虫成灾的)
  • accompanied by:配以、伴随

  • wash down:(用饮料)送下、冲下

    • 例:wash down pills with water(用水送服药片)
  • coarse /kɔːrs/:粗糙的、劣质的

生动描写:

1
2
3
4
5
6
7
8
9
住宿条件:
🏚️ 客栈:脏、跳蚤多
🍞 食物:陈年面包 + 奶酪
🍷 饮料:劣质葡萄酒

画面感:
想象一下,你爬了一天山,累得半死,
结果住的地方满是跳蚤,吃的是硬邦邦的
一年前的面包,喝的是难以下咽的酸酒...

1
2
3
4
Often a valley boasted no inn at all, and climbers found 
shelter wherever they could — sometimes with the local
priest (who was usually as poor as his parishioners),
sometimes with shepherds or cheese-makers.

翻译:
很多山谷甚至连一家客栈都没有,登山者只能随遇而安地
找住处——有时住在当地牧师家里(牧师通常和他的教民
一样穷),有时住在牧羊人或奶酪制作者家里。

关键词:

  • boast:拥有、以…自豪

    • 这里是反讽:连一家客栈都”拥有不了”
  • shelter:庇护所、住处

  • priest /priːst/:牧师

  • parishioners /pəˈrɪʃənərz/:教区居民

  • shepherds /ˈʃepərdz/:牧羊人

社会背景:

1
2
3
4
5
6
7
8
9
10
19世纪阿尔卑斯山区:
- 极度贫困
- 连牧师都很穷(通常牧师是村里的知识分子)
- 主要职业:放牧、制作奶酪

登山者的住宿选择:
1. 客栈(如果有的话)
2. 牧师家
3. 牧民家
→ 都很简陋

1
2
Invariably the background was the same: dirt and poverty, 
and very uncomfortable.

翻译:
无一例外,背景都是一样的:肮脏、贫穷,而且非常不舒适。

关键词:

  • invariably /ɪnˈveriəbli/:总是、无一例外地
    • in- (not) + vari- (vary变化) + -ably
    • = 不变地、一成不变地

修辞:

  • 三个并列:dirt, poverty, uncomfortable
  • 递进强调恶劣条件

1
2
3
For men accustomed to eating seven-course dinners and 
sleeping between fine linen sheets at home, the change
to the Alps must have been very hard indeed.

翻译:
对于那些在家习惯了吃七道菜的晚餐、睡在精美亚麻床单上的
人来说,到阿尔卑斯山的这种转变一定非常艰难。

关键词:

  • accustomed to:习惯于

    • be/get accustomed to doing
  • seven-course dinner:七道菜的正餐

    1
    2
    3
    4
    5
    6
    7
    8
    维多利亚时代的正式晚餐:
    1. 开胃菜(Appetizer)
    2. 汤(Soup)
    3. 鱼(Fish)
    4. 主菜(Main course)
    5. 沙拉(Salad)
    6. 甜点(Dessert)
    7. 咖啡/茶(Coffee/Tea)
  • linen /ˈlɪnɪn/:亚麻布

    • fine linen sheets:高档亚麻床单
  • must have been:(对过去的推测)一定是

社会背景:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
早期登山者的身份:
✅ 上流社会
✅ 富裕阶层
✅ 有闲暇时间

生活对比:
在家:
🍽️ 七道菜正餐
🛏️ 高档床单
🏰 舒适豪宅

在山里:
🍞 陈年面包 + 奶酪
🛏️ 跳蚤满床
🏚️ 简陋小屋

→ 巨大的反差!

🎯 文章结构分析

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
总体结构:今昔对比

第一段:登山理念的对比
┌─────────────────────────┐
│ 现代:追求难度和挑战 │
│ ↕️ 对比 │
│ 早期:只求登顶(首次征服) │
└─────────────────────────┘

第二段:早期登山的艰苦条件
┌─────────────────────────┐
│ 住宿:脏、跳蚤、简陋 │
│ 饮食:陈年面包、劣质酒 │
│ 环境:贫困、与世隔绝 │
│ 对比:上流社会 vs 山区贫困 │
└─────────────────────────┘

写作手法:
1. 对比(现代 vs 早期)
2. 具体描写(细节丰富)
3. 层层递进(从理念到条件)

📚 重点词汇总结

核心词汇

单词 音标 词性 含义 例句
alpinist /ˈælpɪnɪst/ n. 登山者 Modern alpinists seek challenges.
pioneering /ˌpaɪəˈnɪrɪŋ/ adj. 开拓性的 the pioneering days of mountaineering
summit /ˈsʌmɪt/ n. 山顶、顶峰 reach the summit
perilous /ˈperələs/ adj. 危险的 perilous journey
shudder /ˈʃʌdər/ v. 颤抖、战栗 shudder at the thought
court /kɔːrt/ v. 追求、招致 court danger/disaster
solitary /ˈsɑːləteri/ adj. 唯一的、孤独的 a solitary goal
impoverished /ɪmˈpɑːvərɪʃt/ adj. 贫困的 impoverished villages
inn /ɪn/ n. 小旅馆、客栈 stay at an inn
flea-ridden /ˈfliː rɪdn/ adj. 满是跳蚤的 flea-ridden beds
coarse /kɔːrs/ adj. 粗糙的、粗劣的 coarse wine
boast /boʊst/ v. 拥有、自夸 The valley boasted no inn.
shelter /ˈʃeltər/ n. 庇护所 find shelter
parishioner /pəˈrɪʃənər/ n. 教区居民 poor parishioners
shepherd /ˈʃepərd/ n. 牧羊人 stay with shepherds
linen /ˈlɪnɪn/ n. 亚麻布 fine linen sheets
invariably /ɪnˈveriəbli/ adv. 总是、不变地 invariably the same

重点短语

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1. go out of one's way to do
特意去做、刻意做
例:He went out of his way to help me.

2. cut off from
与...隔绝
例:cut off from civilization

3. wash down
(用饮料)冲下
例:wash down food with beer

4. be accustomed to
习惯于
例:be accustomed to luxury

5. must have been
(对过去的推测)一定是
例:It must have been difficult.

🎓 写作技巧学习

1. 对比手法

1
2
3
4
5
6
7
8
有效的对比结构:
- 现代 vs 过去
- 理想 vs 现实
- 期望 vs 实际

本文:
现代登山者 ↔ 早期登山者
舒适家居 ↔ 艰苦山区

2. 细节描写

1
2
3
4
5
6
7
不要泛泛而谈,要具体:
❌ "条件很差"
✅ "客栈又脏又满是跳蚤"
✅ "面包已有一年之久"
✅ "用粗劣的葡萄酒冲下去"

→ 让读者有画面感

3. 层层递进

1
2
3
4
5
从抽象到具体:
1. 登山理念(抽象)
2. 住宿条件(具体)
3. 饮食状况(更具体)
4. 生活对比(强化)

💭 深层思考

历史背景

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
为什么早期登山者是上流社会?

1. 时间:
- 登山需要几周甚至几个月
- 只有贵族、富商有闲暇

2. 金钱:
- 雇佣向导、搬运工
- 购买装备
- 旅行费用

3. 教育:
- 探险精神
- 科学兴趣(很多是地质学家、博物学家)

4. 社会地位:
- 征服未知山峰 = 荣誉
- 回国后成为名人

时代变迁

1
2
3
4
5
6
7
8
9
10
11
12
13
从早期到现代:

早期(1850-1900):
目标:首次登顶
精神:探险、征服
身份:贵族、富人

现代(1950-至今):
目标:挑战难度
精神:极限运动
身份:专业运动员、爱好者

→ 从"征服自然"到"挑战自我"

✍️ 练习建议

1. 复述练习

1
2
3
4
用自己的话概括:
- 早期登山者的目标是什么?
- 他们面临哪些困难?
- 与现代登山者有何不同?

2. 写作练习

1
2
3
4
模仿本文结构,写一篇对比文章:
- 早期旅行 vs 现代旅行
- 早期通信 vs 现代通信
- 早期教育 vs 现代教育

3. 词汇应用

1
2
3
4
5
用本课词汇造句:
- pioneering
- perilous
- impoverished
- invariably

How much of each year do spiders spend killing insects?

Why, you may wonder, should spiders be our friends? Because they destroy so many insects, and insects include some of the greatest enemies of the human race. Insects would make it impossible for us to live in the world; they would devour all our crops and kill our flocks and herds, if it were not for the protection we get from insect-eating animals. We owe a lot to the birds and beasts who eat insects but all of them put together kill only a fraction of the number destroyed by spiders. Moreover, unlike some of the other insect eaters, spiders never do the least harm to us or our belongings.

Spiders are not insects, as many people think, not even nearly related to them. One can tell the difference almost at a glance, for a spider always has eight legs and an insect never more than six.

How many spiders are engaged in this work on our behalf? One authority on spiders made a census of the spiders in a grass field in the south of England, and he estimated that there were more than 2,250,000 in one acre; that is something like 6,000,000 spiders of different kinds of a football pitch. Spiders are busy for at least half the year in killing insects. It is impossible to make more than the wildest guess at how many they kill, but they are hungry creatures, not content with only three meals a day. It has been estimated that the weight of all the insects destroyed by spiders in Britain in one year would be greater than the total weight of all the human beings in the country.

文章讲解

📋 文章主题

这是一篇说明文,主题是:蜘蛛是人类的朋友,因为它们大量捕食昆虫


🎯 文章结构分析

第一段:蜘蛛的重要作用

  • 核心观点:蜘蛛通过消灭昆虫保护人类
  • 论证逻辑
    1. 昆虫是人类的大敌(会毁坏庄稼、杀死牲畜)
    2. 食虫动物保护了我们
    3. 蜘蛛杀死的昆虫数量远超其他食虫动物
    4. 蜘蛛对人类无害

第二段:蜘蛛与昆虫的区别

  • 纠正常见误解:蜘蛛不是昆虫
  • 简单辨别方法:蜘蛛8条腿,昆虫最多6条腿

第三段:惊人的数据

用具体数字说明蜘蛛的贡献:

  • 密度:英格兰南部草地,每英亩超过225万只蜘蛛
  • 换算:一个足球场大小约有600万只不同种类的蜘蛛
  • 工作时长:每年至少半年在捕食昆虫
  • 食量:英国蜘蛛一年消灭的昆虫总重量 > 全国人口总重量

📚 重点词汇解析

单词 词性 含义 用法
devour v. 吞食,毁灭 devour all our crops
flocks n. 羊群 flocks and herds(成对使用)
herds n. 牛群 指大型牲畜群
beasts n. 野兽,动物 birds and beasts(鸟兽)
glance n. 一瞥 at a glance(一眼就能看出)
behalf n. 利益,代表 on our behalf(为我们)
census n. 普查,统计 make a census of…
acre n. 英亩 面积单位(约4047平方米)
pitch n. 球场 football pitch(足球场)

✨ 精彩表达

  1. “insects include some of the greatest enemies of the human race”

    • 昆虫是人类最大的敌人之一
  2. “all of them put together kill only a fraction of…”

    • 所有这些加起来也只杀死了一小部分
    • put together = 加在一起
  3. “never do the least harm to us”

    • 从不对我们造成丝毫伤害
    • not the least = 一点也不
  4. “not content with only three meals a day”

    • 不满足于一日三餐
    • 形容蜘蛛食量大

🔢 回答标题问题

“How much of each year do spiders spend killing insects?”

答案:文中明确指出 “at least half the year”(至少半年)


💡 写作手法

  1. 设问开篇:引发读者思考
  2. 数据支撑:用具体统计增强说服力
  3. 对比论证:蜘蛛 vs 其他食虫动物
  4. 纠正误解:科普蜘蛛不是昆虫
  5. 夸张修辞:昆虫重量 > 人口重量(强调效果)

这是一篇典型的科普说明文,逻辑清晰,数据详实,语言生动!

Why are legends handed down by storytellers useful?

We can read of things that happened 5,000 years ago in the Near East, where people first learned to write. But there are some parts of the world where even now people cannot write. The only way that they can preserve their history is to recount it as sagas - legends handed down from one generation of storyteller to another. These legends are useful because the can tell us something about migrations of people who lived long ago, but none could write down what they did. Anthropologist wondered where the remote ancestors of the Polynesian peoples now living in the Pacific Islands came from. The sagas of these people explain that some of them came from Indonesia about 2,000 years ago.

But the first people who were like ourselves lived so long ago that even their sagas, if they had any, are forgotten. So archaeologists have neither history nor legends to help them find out where the first “modern men” came from.

Fortunately, however, ancient men made tools of stone, especially flint, because this is easier to shape than other kinds. They may also have used wood and skins, but these have rotted away. Stone does not decay, and so the tools of lone ago have remained when even the bones of the men who made them have disappeared without trace.

📖 文章主题

探讨人类如何通过文字记录、口头传说和考古发现来了解古代人类的历史。


🎯 核心问题回答

Why are legends handed down by storytellers useful?

答案:传说之所以有用,是因为它们能告诉我们关于古代人类迁徙的信息,尤其是那些生活在很久以前、没有文字记录能力的人群。

原文依据

“These legends are useful because they can tell us something about migrations of people who lived long ago, but none could write down what they did.”


📝 段落解析

第一段:三种了解历史的方式

核心内容

  1. 文字记录(5,000年前开始)

    • 近东地区最早学会书写
    • 可以读到5000年前发生的事情
  2. 口头传说(无文字地区)

    • 通过讲故事的方式代代相传
    • 称为 sagas(传奇故事)
  3. 传说的价值

    • 帮助了解古代人类的迁徙
    • 例如:波利尼西亚人的祖先来自印度尼西亚(约2000年前)

重点句型

1
2
3
4
5
The only way that they can preserve their history is to recount it as sagas.
他们保存历史的唯一方式就是把它当作传说讲述出来。

结构:The only way (that)... is to do sth.
唯一的方法是...

第二段:最早人类的困境

核心内容

  • 最早的”现代人”生活得太久远
  • 即使有传说也已被遗忘
  • 考古学家既没有历史记录,也没有传说可以依靠

关键表达

1
2
3
4
But the first people who were like ourselves lived so long ago that...
但是最早像我们这样的人生活得如此久远,以至于...

结构:so... that...(如此...以至于...)

第三段:考古学的希望——石器

核心内容

  1. 古人制作石器

    • 主要用燧石(flint),因为容易塑形
    • 也可能用木头和兽皮,但已腐烂
  2. 石头的优势

    • 不会腐烂(decay)
    • 即使制作者的骨头都消失了,石器仍然保留

重点对比

材料 特点 结果
木头、兽皮 会腐烂(rot away) 已消失
石头 不会腐烂(does not decay) 保存至今
人骨 会消失(disappear without trace) 无踪迹

📚 重点词汇详解

1. recount /rɪˈkaʊnt/

  • 词性:动词
  • 含义:详细叙述,讲述
  • 例句
    1
    2
    She recounted her adventures in Africa.
    她详细讲述了在非洲的冒险经历。

2. saga /ˈsɑːɡə/

  • 词性:名词
  • 含义:传奇故事;长篇冒险故事
  • 例句
    1
    2
    The saga of their journey across the desert fascinated everyone.
    他们穿越沙漠的传奇故事让所有人着迷。

3. anthropologist /ˌænθrəˈpɒlədʒɪst/

  • 词性:名词
  • 含义:人类学家
  • 词根:anthropo-(人类)+ -logist(学家)
  • 相关词
    • anthropology(人类学)
    • archaeology(考古学)

4. Polynesian /ˌpɒlɪˈniːʒən/

  • 词性:形容词/名词
  • 含义:波利尼西亚的/波利尼西亚人
  • 地理:太平洋岛屿地区

5. flint /flɪnt/

  • 词性:名词
  • 含义:燧石(一种坚硬的石头)
  • 用途:古代制作工具和生火

6. rot /rɒt/

  • 词性:动词
  • 含义:腐烂,腐朽
  • 短语:rot away(完全腐烂)
  • 例句
    1
    2
    The wood had rotted away over the years.
    木头经年累月已经腐烂了。

7. decay /dɪˈkeɪ/

  • 词性:动词/名词
  • 含义:腐烂;衰败
  • 区别
    • rot:强调有机物质的腐烂
    • decay:更广泛,可指任何形式的衰败

8. trace /treɪs/

  • 词性:名词/动词
  • 含义:痕迹;追踪
  • 短语:without trace(无影无踪)
  • 例句
    1
    2
    The plane vanished without trace.
    飞机消失得无影无踪。

🔑 重点语法结构

1. 定语从句

1
2
3
4
5
We can read of things that happened 5,000 years ago.
我们可以读到5000年前发生的事情。

The only way that they can preserve their history is...
他们保存历史的唯一方式是...

2. 被动语态

1
2
3
4
legends handed down from one generation to another
代代相传的传说

(完整形式:legends that are handed down...)

3. so…that…结构

1
2
lived so long ago that even their sagas are forgotten
生活得如此久远,以至于即使他们的传说也被遗忘了

4. neither…nor…结构

1
2
archaeologists have neither history nor legends to help them
考古学家既没有历史也没有传说来帮助他们

💡 文章逻辑结构

1
2
3
4
5
6
7
8
9
10
11
12
13
了解古代人类历史的三种方式:

1. 文字记录 ✓
└─ 5000年前开始
└─ 有限制:只在某些地区

2. 口头传说 ✓
└─ 无文字地区的方式
└─ 有限制:最早的人类连传说都没留下

3. 考古发现 ✓✓✓
└─ 石器工具
└─ 最可靠:石头不会腐烂

🎓 学习要点

理解层面

  1. 人类历史研究的三个来源
  2. 为什么石器对考古学如此重要
  3. 不同材料的保存性差异

语言层面

  1. 定语从句的使用
  2. 因果关系的表达(because, so…that)
  3. 对比结构(but, however)

词汇层面

  1. 历史考古相关词汇
  2. 材料特性描述词汇
  3. 时间表达方式

✍️ 写作可借鉴的表达

  1. 引出话题

    1
    2
    We can read of things that happened...
    我们可以读到...发生的事情
  2. 转折对比

    1
    2
    But there are some parts of the world where...
    但是世界上有些地方...
  3. 强调唯一性

    1
    2
    The only way that... is to...
    ...的唯一方式是...
  4. 表达幸运

    1
    2
    Fortunately, however,...
    然而,幸运的是...

这篇文章展示了说明文的典型结构:提出问题→分析问题→给出答案,语言简洁清晰,逻辑严密,非常适合学习英语写作!

Problem

Given a collection of integers that might contain duplicates, nums, return all possible subsets.
Note: The solution set must not contain duplicate subsets.
For example,
If nums = [1,2,2], a solution is:

1
2
3
4
5
6
7
8
[
[2],
[1],
[1,2,2],
[2,2],
[1,2],
[]
]

方法

设定返回的列表的列表为result。先对数组排序,如果nums[i]!=nums[i-1],那么就遍历result,复制每个列表为tempList,加入nums[i],然后将该列表加入result中;如果nums[i]==nums[i-1],那么记录下加入nums[i-1]前返回列表的大小resultIndexresultSize为加入nums[i-1]后的大小,对result中从resultIndexresultSize的列表加入nums[i],然后将新生成的列表加入result

代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class Solution(object):
def subsetsWithDup(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
result = [[]]
nums.sort()
i = 0
resultSize = 0
while i < len(nums):
num = nums[i]
resultIndex = 0
if i>0 and nums[i]==nums[i-1]:
resultIndex = resultSize;
resultSize = len(result)
while resultIndex < resultSize:
tempList = result[resultIndex][:]
tempList.append(num)
result.append(tempList)
resultIndex += 1
i += 1
return result

assert Solution().subsetsWithDup([1,2,2]) == [[],[1],[2],[1,2],[2,2],[1,2,2]]

Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.

For example, given the range [5, 7], you should return 4.

方法

直接对所有数按位与,会超时,因此只能采用别的方法。
对于[1,3], 对应二进制位01,010,011,按位与为0;对于[5,7],对应二进制为0101,0110,0111,按位与为0100
对于[m,n],如果m!=n,那么m和n最右一位按位与必然为0;同时将m,n都右移一位,用bits记录移位数,如果m!=n,继续将m,n右移一位。最后m==n时,将m<<bits位即可,此时m可以为0或为其他值。如果m为0,n也为0,那么m和n的位数并不相同,因此结果为0;如果m不为0,那么m和n前几位必然相同,用m<<bits就可以得到最后结果。

C代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <assert.h>

int rangeBitwiseAnd(int m, int n) {
int bits = 0;
while(m != n) {
m >>= 1;
n >>= 1;
bits++;
}
return m<<bits;
}

/**
int rangeBitwiseAnd(int m, int n) {
int bitwiseAnd = m;
while(m <= n) {
bitwiseAnd &= m;
m++;
}
return bitwiseAnd;
}
*/

int main() {
assert(rangeBitwiseAnd(5,7) == 4);
assert(rangeBitwiseAnd(1,3) == 0);

return 0;
}

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.

The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2.

Please note that your returned answers (both index1 and index2) are not zero-based.

You may assume that each input would have exactly one solution.

Input: numbers={2, 7, 11, 15}, target=9
Output: index1=1, index2=2

C代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <assert.h>
#include <stdlib.h>

/**
* Return an array of size *returnSize.
* Note: The returned array must be malloced, assume caller calls free().
*/
int* twoSum(int* nums, int numsSize, int target, int* returnSize) {
int left = 0, right = numsSize-1;
int* returnNums = NULL;
int sum = 0;
while(left < right) {
sum = nums[left]+nums[right];
if(sum == target) {
returnNums = (int *)malloc(sizeof(int)*2);
returnNums[0] = left+1;
returnNums[1] = right+1;
*returnSize = 2;
break;
}
else if(sum > target)
right--;
else
left++;
}
return returnNums;
}

/**
int* twoSum(int* nums, int numsSize, int target, int* returnSize) {
int i = 0, j = i+1;
int* returnNums = NULL;
for(i=0, j=i+1; i < numsSize-1;) {
if(nums[i] + nums[j] == target) {
returnNums = (int *)malloc(sizeof(int) * 2);
returnNums[0] = i+1;
returnNums[1] = j+1;
*returnSize = 2;
return returnNums;
}
else if(nums[i] + nums[j] < target) {
j++;
if(j == numsSize) {
i++;
j = i+1;
}
}
else {
i++;
j = i+1;
}
}
return returnNums;
}
*/

int main() {
int nums[3] = {2,3,4};
int returnSize = 0;
int* returnNums = twoSum(nums, 3, 6, &returnSize);
assert(returnNums[0] == 1);
assert(returnNums[1] == 3);

return 0;
}

Problem

Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited number of times.

Note:

  • All numbers (including target) will be positive integers.

  • The solution set must not contain duplicate combinations.
    For example, given candidate set [2, 3, 6, 7] and target 7,
    A solution set is:

    1
    2
    3
    4
    [
    [7],
    [2, 2, 3]
    ]

难度

Medium

思路

利用栈,如果要入栈的数加上已入栈的数的和小于target, 则入栈;如果等于target,则复制该栈,加入返回结果,然后从栈取出一个数,取其下一个数准备入栈;如果大于target, 则从栈取出一个数,取其下一个数准备入栈。注意一些边界条件的判断

Python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class Solution(object):
def combinationSum(self, candidates, target):
"""
:type candidates: List[int]
:type tatget: int
:rtype List[List[int]]
"""
nums = []
indexes = []
returnLists = []
sum = 0
i = 0
candidates.sort()
while True:
while i >= len(candidates):
if len(nums) == 0:
return returnLists
sum -= nums.pop()
i = indexes.pop()+1
if sum + candidates[i] < target:
nums.append(candidates[i])
indexes.append(i)
sum += candidates[i]
elif sum + candidates[i] > target:
if len(nums) > 0:
sum -= nums.pop()
i = indexes.pop()+1
else:
return returnLists
elif sum + candidates[i] == target:
newNums = nums[:]
newNums.append(candidates[i])
returnLists.append(newNums)
if len(nums) > 0:
sum -= nums.pop()
i = indexes.pop()+1
else:
i += 1


assert Solution().combinationSum([2,3,4], 7)==[[2,2,3], [3,4]]
assert Solution().combinationSum([2,3,6,7], 7)==[[2,2,3], [7]]
assert Solution().combinationSum([2], 1) == []