2010.04.22 第四次系列讲座
程宇 2008-2009 (Seed) Jakarta 2nd Chengdu 13th 2009-2010 Assistant Coach Hefei, Hsinchu, Tokyo, World Final in Harbin bbsID: chycharlie chycharlie@gmail.com
Thinking for Fun (Part 1) SJTU ICPC Team Cheng Yu
Contents ICPC Team Selection Paper Based Test Year 2004, 2005, 2006 and 2009 Mathematics / Riddles
Some fact about Stage 1 Problems in English Less important than computer based test Last year: 2 hours 10 problems about maths & algorithm
Using your Head is Permitted Let’s start now!
2004 (2) Loop mod 10: 0 1 5 6 2 → 4 → 8 → 6 3 → 9 → 7 → 1 4 → 6 7 → 9 → 3 → 1 8 → 4 → 2 → 6 9 → 1 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 c b a + 4b + 4c = 1 a + 2b = PI/2 – 1 b + 2c = 1 – PI/4
2004 (15) PI2/6 = S + ¼ * PI2/6
2004 (16) C(4,2) = 6 x1 + x2 + x3 = 2
2005 (2)
2005 (6)
2005 (7) 12个小球中有一个质量与众不同,但不知是轻是重 能否用无砝码的天平在三次内找出来 1+5+6 > 2+8+9 1重, 8轻 1+2+3+4 > 5+6+7+8 1+2+3+4 = 5+6+7+8 1+5+6 = 2+8+9 34重, 7轻 9 + 10 > 1 + 11 9 + 10 = 1 + 11 1+5+6 < 2+8+9 2重, 56轻 出现在不等号异侧的球一定是好的
Odd Ball Problem 13 balls Upper Bound given by informatics Recent MSRA interview question 1000 boxes, each contain 12 balls 1 heavier ball in every box 121000 = 3k → k = 2262
2009 (1) Add by calculator 2. Sum = AE – ABE – ACE – ADE + ACDE 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? Add by calculator 2. Sum = AE – ABE – ACE – ADE + ACDE
2009 (3) 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. 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 continue with some riddles! Using your Head is still Permitted
Use a circle 直线带球时,在哪里拥有最大的射门角度?
Think twice 一架飞机先向北飞 1000 km, 又向东飞行了 1000 km, 最后向南飞 1000 km, 发现回到了起点, 请问它是在哪里起飞的? 南极
V + F = E + 2 N 个平面最多能把空间分为多少个部分? N 条直线最多能把平面分为多少个部分?
Mathematical Induction 只要能从起点遍历所有自然数即可 算术几何平均不等式
Riddles 拿全四种花色的期望 正八面体最近距离
2009 (8) 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 = 2 b). Try to solve N = 16
Riddles 拿全四种花色的期望 正八面体最近距离 2n个人,开箱子越狱
http://www.matrix67.com/blog
Riddles: blog/archives/2671 给一个瞎子52张扑克牌,并告诉他里面恰好有10张牌是正面朝上的。要求这个瞎子把牌分成两堆,使得每堆牌里正面朝上的牌的张数一样多。瞎子应该怎么做? 一个环形轨道上有n个加油站,所有加油站的油量总和正好够车跑一圈。证明,总能找到其中一个加油站,使得初始时油箱为空的汽车从这里出发,能够顺利环行一 圈回到起点。
Riddles: blog/archives/2671 如何用一枚硬币等概率地产生一个1到3之间的随机整数? 考虑一个n*n的棋盘,把有公共边的两个格子叫做相邻的格子。初始时,有些格子里有病毒。每一秒钟后,只要一个格子至少有两个相邻格子染上了病毒,那么他 自己也会被感染。为了让所有的格子都被感染,初始时最少需要有几个带病毒的格子?给出一种方案并证明最优性。
多边形一定有内接正三角形
Combinations n * 2n-1 = ∑C(n,k) * k (k=1..n)
Pick Theorem
Sierpinski Triangle
Sphere of Love
Calculate the mass of a circle Open Problem Calculate the mass of a circle ρ(x,y) = ln(x2 + y2) 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!