Upload
phong
View
104
Download
0
Tags:
Embed Size (px)
DESCRIPTION
2010.04.22 第四次系列讲座. 程宇 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th 2009-2010 Assistant Coach Hefei , Hsinchu , Tokyo , World Final in Harbin bbsID: chycharlie [email protected]. Thinking for Fun (Part 1). SJTU ICPC Team Cheng Yu. Contents. - PowerPoint PPT Presentation
Citation preview
2010.04.22 第四次系列讲座
程宇
2008-2009 (Seed)Jakarta 2nd
Chengdu 13th
2009-2010Assistant CoachHefei, Hsinchu, Tokyo, World Final in Harbin
bbsID: [email protected]
Thinking for Fun(Part 1)
SJTU ICPC TeamCheng Yu
Contents
• ICPC Team Selection Paper Based TestYear 2004, 2005, 2006 and 2009
• Mathematics / Riddles
Some fact about Stage 1
• Problems in English
• Less important than computer based test
• Last year:2 hours10 problems about maths & algorithm
Let’s start now!
Using your Head is Permitted
Loop mod 10:
0 1 5 62 → 4 → 8 → 63 → 9 → 7 → 14 → 67 → 9 → 3 → 18 → 4 → 2 → 69 → 1
2004 (2)
Loop mod 2:
0 1
Module
(a * b) % m = (a % m) * (b % m)
p is a prime:Wilson: (p-1)! ≡ -1 (mod p)Fermat: ap-1 ≡ 1 (mod p)
2004 (11)
a
cb a + 4b + 4c = 1
a + 2b = PI/2 – 1b + 2c = 1 – PI/4
2004 (15)
PI2/6 = S + ¼ * PI2/6
2004 (16)
x1 + x2 + x3 = 2C(4,2) = 6
2005 (2)
2005 (6)
1+2+3+4 = 5+6+7+8
12 个小球中有一个质量与众不同,但不知是轻是重能否用无砝码的天平在三次内找出来
1+2+3+4 > 5+6+7+8 9 + 10 = 1 + 11
1+5+6 > 2+8+9 1 重 , 8 轻
出现在不等号异侧的球一定是好的
9 + 10 > 1 + 111+5+6 = 2+8+9 34 重 , 7 轻
1+5+6 < 2+8+9 2 重 , 56 轻
2005 (7)
Odd Ball Problem
13 balls
Upper Bound given by informatics
Recent MSRA interview question1000 boxes, each contain 12 balls1 heavier ball in every box121000 = 3k → k = 2262
Peter’s home is located (0, 0), and the school is located (9, 9). He can only walk up/right, and cannot pass (2,7),(5,3),(7,6).Can you tell me how many routes are there from peter’s home to school?
2009 (1)
1.Add by calculator
2. Sum = AE – ABE – ACE –
ADE + ACDE
A k-digit number n is called square-repetition if and only if the last k-digit of n2 is still n.For example, the last two digit of 625(252) is 25, so 25 is square-repetition.List all the 4-digit square-repetition number.
2009 (3)
9376
Strategy of Paper Based Test
• Try to read all the problem first.
• Skip the problem that is too hard.
• Think more, write less. Write what is important.
Let’s continuewith some riddles!
Using your Head is still Permitted
直线带球时,在哪里拥有最大的射门角度?
Use a circle
一架飞机先向北飞 1000 km ,又向东飞行了 1000 km ,最后向南飞 1000 km ,发现回到了起点,请问它是在哪里起飞的?
南极
Think twice
N 个平面最多能把空间分为多少个部分?
N 条直线最多能把平面分为多少个部分?
( 1) ( ) 1L n L n n
( 1) ( ) ( )P n P n L n
V + F = E + 2
1 1[ ( )]n n Nf f f f
只要能从起点遍历所有自然数即可
算术几何平均不等式( ) (2 )f n f n( ) ( 1)f n f n
Mathematical Induction
Riddles
拿全四种花色的期望
正八面体最近距离
A group of N students is taking an IQ test. A professor will write a random number from 1 to N on everyone’s back. Notice that two students may have the same number. One can see everybody else’s number, but not his own. They are not allowed to communicate in any way.They will then go to the professor’s room one by one, try to guess the number wrote on their own back. If anyone answers correctly, they all get to pass, otherwise they fail.a). Start with N = 2b). Try to solve N = 16
2009 (8)
Riddles
拿全四种花色的期望
正八面体最近距离
2n 个人,开箱子越狱
http://www.matrix67.com/blog
给一个瞎子 52 张扑克牌,并告诉他里面恰好有 10 张牌是正面朝上的。要求这个瞎子把牌分成两堆,使得每堆牌里正面朝上的牌的张数一样多。瞎子应该怎么做?
一个环形轨道上有 n 个加油站,所有加油站的油量总和正好够车跑一圈。证明,总能找到其中一个加油站,使得初始时油箱为空的汽车从这里出发,能够顺利环行一 圈回到起点。
Riddles: blog/archives/2671
如何用一枚硬币等概率地产生一个 1 到 3 之间的随机整数?
考虑一个 n*n 的棋盘,把有公共边的两个格子叫做相邻的格子。初始时,有些格子里有病毒。每一秒钟后,只要一个格子至少有两个相邻格子染上了病毒,那么他 自己也会被感染。为了让所有的格子都被感染,初始时最少需要有几个带病毒的格子?给出一种方案并证明最优性。
Riddles: blog/archives/2671
多边形一定有内接正三角形
n * 2n-1 = ∑C(n,k) * k (k=1..n)
Combinations
Pick Theorem
Sierpinski Triangle
Sphere of Love
Calculate the mass of a circleρ(x,y) = ln(x2 + y2)
Open Problem
ANS = S * (ρ @ center)
Something about ICPC
• Using your head, or it will get rusty.
• There will be sacrifices, but I promise you, the experience is worth it.
• Learn teamwork & make friends.
Thank You!