存档

‘算法’ 分类的存档

Google Code Jam 2010 Qualification Round – Problem C Theme Park

2010年5月10日 没有评论

Roller coasters are so much fun! It seems like everybody who visits the theme park wants to ride the roller coaster. Some people go alone; other people go in groups, and don’t want to board the roller coaster unless they can all go together. And everyone who rides the roller coaster wants to ride again. A ride costs 1 Euro per person; your job is to figure out how much money the roller coaster will make today.
阅读全文…

分类: 算法 标签:

Google Code Jam 2010 Qualification Round – Problem A Snapper Chain

2010年5月9日 没有评论

The Snapper is a clever little device that, on one side, plugs its input plug into an output socket, and, on the other side, exposes an output socket for plugging in a light or other device.

When a Snapper is in the ON state and is receiving power from its input plug, then the device connected to its output socket is receiving power as well. When you snap your fingers — making a clicking sound — any Snapper receiving power at the time of the snap toggles between the ON and OFF states.
阅读全文…

分类: 算法 标签:

Problem C in Google Code Jam 2009 Qualification Round

2009年9月5日 2 条评论

输入N个字符串,每个字符串不超过500个字符,判断该字符串包含多少个”welcome to code jam”,不一定要连续,主要从左到右的次序相同即可。

阅读全文…

分类: 算法 标签: