1223I“c&EÆcšŽém
CCF-NOIP-2016
Jp|£Em¤1Á
¿mžmµ2016c1120F8:3012:00
K8¶¡ |Üê¯K d[ ²äj
K8a. DÚ. DÚ. DÚ.
8¹ problem earthworm angrybirds
Œ‰1©‡¶ problem earthworm angrybirds
Ñ\©‡¶ problem.in earthworm.in angrybirds.in
ÑÑ©‡¶ problem.out earthworm.out angrybirds.out
z‡ÿÁ:ž 1.0¦ 1.0¦ 2.0¦
S› 512 MB 512 MB 512 MB
ÿÁ:ê8 20 20 20
z‡ÿÁ:©Š 5 5 5
J§S©‡¶
éuC++Šó problem.cpp earthworm.cpp angrybirds.cpp
éuC Šó problem.c earthworm.c angrybirds.c
éuPascalŠó problem.pas earthworm.pas angrybirds.pas
?ÈÀ‘
éuC++Šó -lm -lm -lm
éuC Šó -lm -lm -lm
éuPascalŠó
5¿¯‘µ
1.©‡¶£§S¶ÚÑ\ÑÑ©‡¶¤7L¦^=©"
2.ØšAÏ`²§(J'ªþÑ1"˜‚9©"£©'"
3.C/C++¥¼êmain()ˆ£Ša.7L´int§§S~(垈£Š7L
´0"
4.IÚ˜µÿžæ^Å옵CPU AMD Athlon(tm) II x2 240 processor§
2.8GHz§S4G§þãž±d˜O"
5.JøLinux‚ªN\~©‡"
6.µÿ3NOI Linuxe?1"
7.?Ȟ؋m?Û`zÀ‘"
1223I“c&EÆcšŽémJp|£Em¤ 1Á|Üê¯K£problem¤
|Üê¯K£problem¤
=¯K£ã>
|ÜêC
m
nL«´ln‡Ô¬¥ÀÑm‡Ô¬Yê"Þ‡~f§l
(1;2;3)
n‡Ô¬¥ÀJü‡Ô¬Œ±k (1;2);(1;3);(2;3)ùn«ÀJ{"Šâ|Üê½
§·‚Œ±‰ÑOŽ|ÜêC
m
n˜„úªµ
C
m
n=
n!
m!(n m)!
Ù¥n!=12 n"
iŽXJ‰½n;mÚk§éu¤k
0in; 0jmin(i;m)kõé
(i;j)÷vC
j
i
´kê"
=Ñ\‚ª>
l©‡problem.in¥Ö\êâ"
1˜1kü‡êt;k§Ù¥t“LTÿÁ:okõ|ÿÁêâ§k¿Â„
=¯K£ã>"
e5t1z1ü‡ên;m§Ù¥n;m¿Â„=¯K£ã>"
=ÑÑ‚ª>
ÑÑ©‡problem.out¥"
t1§z1˜‡ê“L¤k
0in; 0jmin(i;m)¥kõé (i;j)÷v
C
j
i
´kê"
=~1Ñ\>
1 2
3 3
=~1ÑÑ>
1
=~1`²>
3¤kŒUœ¹¥§kC
1
2
=2´2ê"
1211
1223I“c&EÆcšŽémJp|£Em¤ 1Á|Üê¯K£problem¤
=~2Ñ\>
2 5
4 5
6 7
=~2ÑÑ>
0
7
=f?Ö>
ÿÁ: n m k t
1
3 3
=2 =1
2 =3 10
4
3
7 7
=4 =1
4 =5 10
4
5
10 10
=6 =1
6 =7 10
4
7
20 100
=8 =1
8 =9 10
4
9
25 2000
=10 =1
10 =11 10
4
11
60 20
=12 =1
12 =13 10
4
13
100
25
=14 =1
14 =15 10
4
15
60
=16 =1
16 =17 10
4
17
2000
100
=18 =1
18 =19 10
4
19
2000
=20 =1
20 =21 10
4
1311
1223I“c&EÆcšŽémJp|£Em¤ 1Ád[£earthworm¤
d[£earthworm¤
=¯K£ã>
K¥§·‚ò^ÎÒbccL«éc•e§~Xµb3:0c=b3:1c=b3:9c=3"
mmICd[¤/œ…9aBIaB<d[‚v{§mmIÐ
ž Ã5¦‚ž«d["
mmIpy3knd[£nê¤"zd[Pkݧ·‚1id
[Ýai
(i=1;2; : : : ;n )§¿y¤kÝÑ´šK
ê£=µŒU3Ý
0d[¤
NOIP2016提高组复赛试题day2,2016年NOIP信息学奥赛提高组复赛C++真题day2