Topic Links:
http://acm.hdu.edu.cn/showproblem.php?pid=5774
Main Topic :
Known 1946~2015 every year to win who is, give n names, ask how many wins.
Topic Ideas:
Simulation
Just make a watch.
1#include <stdio.h>2#include <string.h>3 Charlist[ -][ *]=4{"Cleveland Cavaliers",5 "Golden State Warriors",6 "San Antonio Spurs",7 "Miami Heat",8 "Miami Heat",9 "Dallas Mavericks",Ten "L.A. Lakers", One "L.A. Lakers", A "Boston Celtics", - "San Antonio Spurs", - "Miami Heat", the "San Antonio Spurs", - "Detroit Pistons", - "San Antonio Spurs", - "L.A. Lakers", + "L.A. Lakers", - "L.A. Lakers", + "San Antonio Spurs", A "Chicago Bulls", at "Chicago Bulls", - "Chicago Bulls", - "Houston Rockets", - "Houston Rockets", - "Chicago Bulls", - "Chicago Bulls", in "Chicago Bulls", - "Detroit Pistons", to "Detroit Pistons", + "L.A. Lakers", - "L.A. Lakers", the "Boston Celtics", * "L.A. Lakers", $ "Boston Celtics",Panax Notoginseng "Philadelphia 76ers", - "L.A. Lakers", the "Boston Celtics", + "L.A. Lakers", A "Seattle Sonics", the "Washington Bullets", + "Portland Trail Blazers", - "Boston Celtics", $ "Golden State Warriors", $ "Boston Celtics", - "New York Knicks", - "L.A. Lakers", the "Milwaukee Bucks", - "New York Knicks",Wuyi "Boston Celtics", the "Boston Celtics", - "Philadelphia 76ers", Wu "Boston Celtics", - "Boston Celtics", About "Boston Celtics", $ "Boston Celtics", - "Boston Celtics", - "Boston Celtics", - "Boston Celtics", A "Boston Celtics", + "St. Louis Hawks", the "Boston Celtics", - "Philadelphia Warriors", $ "Syracuse Nats", the "Minneapolis Lakers", the "Minneapolis Lakers", the "Minneapolis Lakers", the "Rochester Royals", - "Minneapolis Lakers", in "Minneapolis Lakers", the "Baltimore Bullets", the "Philadelphia Warriors"}; About intMain () the { the intCas,i,j,ans; the Chartemp[ *]; +scanf"%d\n",&CAs); - for(i=1; i<=cas;i++) the {Bayi gets (temp); theprintf"Case #%d:", i); theans=0; - for(j=0;j< the- $+1; j + +) - if(strcmp (temp,list[j]) = =0) ans++; theprintf"%d\n", ans); the } the return 0; the}View Code
"Analog" HDU 5774 Where Amazing happens