zoukankan      html  css  js  c++  java
  • 【模拟】HDU 5774 Where Amazing Happens

    题目链接:

      http://acm.hdu.edu.cn/showproblem.php?pid=5774

    题目大意

      已知1946~2015每一年赢得人是谁,给n个名字,问赢了多少次。

    题目思路:

      【模拟】

      打个表就好。

     1 #include<stdio.h>
     2 #include<string.h>
     3 char list[100][35]=
     4 {"Cleveland Cavaliers",
     5 "Golden State Warriors",
     6 "San Antonio Spurs",
     7 "Miami Heat",
     8 "Miami Heat",
     9 "Dallas Mavericks",
    10 "L.A. Lakers",
    11 "L.A. Lakers",
    12 "Boston Celtics",
    13 "San Antonio Spurs",
    14 "Miami Heat",
    15 "San Antonio Spurs",
    16 "Detroit Pistons",
    17 "San Antonio Spurs",
    18 "L.A. Lakers",
    19 "L.A. Lakers",
    20 "L.A. Lakers",
    21 "San Antonio Spurs",
    22 "Chicago Bulls",
    23 "Chicago Bulls",
    24 "Chicago Bulls",
    25 "Houston Rockets",
    26 "Houston Rockets",
    27 "Chicago Bulls",
    28 "Chicago Bulls",
    29 "Chicago Bulls",
    30 "Detroit Pistons",
    31 "Detroit Pistons",
    32 "L.A. Lakers",
    33 "L.A. Lakers",
    34 "Boston Celtics",
    35 "L.A. Lakers",
    36 "Boston Celtics",
    37 "Philadelphia 76ers",
    38 "L.A. Lakers",
    39 "Boston Celtics",
    40 "L.A. Lakers",
    41 "Seattle Sonics",
    42 "Washington Bullets",
    43 "Portland Trail Blazers",
    44 "Boston Celtics",
    45 "Golden State Warriors",
    46 "Boston Celtics",
    47 "New York Knicks",
    48 "L.A. Lakers",
    49 "Milwaukee Bucks",
    50 "New York Knicks",
    51 "Boston Celtics",
    52 "Boston Celtics",
    53 "Philadelphia 76ers",
    54 "Boston Celtics",
    55 "Boston Celtics",
    56 "Boston Celtics",
    57 "Boston Celtics",
    58 "Boston Celtics",
    59 "Boston Celtics",
    60 "Boston Celtics",
    61 "Boston Celtics",
    62 "St. Louis Hawks",
    63 "Boston Celtics",
    64 "Philadelphia Warriors",
    65 "Syracuse Nats",
    66 "Minneapolis Lakers",
    67 "Minneapolis Lakers",
    68 "Minneapolis Lakers",
    69 "Rochester Royals",
    70 "Minneapolis Lakers",
    71 "Minneapolis Lakers",
    72 "Baltimore Bullets",
    73 "Philadelphia Warriors"};
    74 int main()
    75 {
    76     int cas,i,j,ans;
    77     char temp[35];
    78     scanf("%d
    ",&cas);
    79     for(i=1;i<=cas;i++)
    80     {
    81         gets(temp);
    82         printf("Case #%d: ",i);
    83         ans=0;
    84         for(j=0;j<115-46+1;j++)
    85         if (strcmp(temp,list[j])==0) ans++;
    86         printf("%d
    ",ans);
    87     }    
    88     return 0;
    89 }
    View Code
  • 相关阅读:
    Response.AddHeader使用实例收集
    JS回车键判断
    详解MongoDB中的多表关联查询($lookup)
    数据库设计三大范式
    一、表的设计步骤
    手把手教你,使用JWT实现单点登录
    【C#】ElasticSearch环境搭建与使用
    C#简单操作MongoDB
    net core WebAPI 初探及连接MySQL
    NoSQL 简介
  • 原文地址:https://www.cnblogs.com/Coolxxx/p/5769525.html
Copyright © 2011-2022 走看看