zoukankan      html  css  js  c++  java
  • SDUTTeam172 Summer Training Practice #2

    Cloned fromUESTC Summer Training #6 Division II
    题目来源:      Ural Regional School Programming Contest 2011
                              (Ural 18731884)

     


    题目挺水,而且有的还挺好玩的,本来五个小时的比赛,由于时间关系,开了两个半小时,实际用时不到2个小时,共12道题,两个人组队做出来了6道。

     

     

    ProblemA  Ural1873  GOV Chronicles

    这是一个纯英语阅读理解,题目描述2000个单词左右,里面出现了11个人,让你数出来每个人参加过几次比赛。

    代码:

    View Code
     1 #include <iostream>
     2 #include <cstdio>
     3 #include <cstring>
     4 using namespace std;
     5 int main()
     6 {
     7     int a[12]={5,20,12,2,1,4,6,1,4,4,1,0},i;
     8     scanf("%d",&i);
     9     printf("%d\n",a[i]);
    10     return 0;
    11 }

     

     

    ProblemD  Ural1876  Centipede's Morning

    说是有一只蜈蚣,左边40条腿,右边40条腿,它有a只左鞋,b只右鞋,然后有一个穿鞋的方法,说它今天特别倒霉,求最多要多长时间穿好鞋,算是一个推公式的题吧。

    代码:

    View Code
     1 #include <iostream>
     2 #include <cstdio>
     3 #include <cstring>
     4 using namespace std;
     5 int main()
     6 {
     7     int a,b,s,s1,s2;
     8     scanf("%d%d",&a,&b);
     9     s1=39*2+40+(a-40)*2+1;
    10     s2=40*2+(b-40)*2+40;
    11     s=s1>s2?s1:s2;
    12     printf("%d\n",s);
    13     return 0;
    14 }

     

     

    ProblemI  Ural1881  Long problem statement

    页数统计,给出每一页可以打印多少行,每一行最多多少个字符,然后给出一串单词,让求需要打印多少张,这么水的题都能错上两次。。。

    代码:

    View Code
     1 #include <iostream>
     2 #include <cstdio>
     3 #include <cstring>
     4 using namespace std;
     5 int main()
     6 {
     7     char s[10001];
     8     int h,w,n,l,sum=1,h1,w1=0;
     9     scanf("%d%d%d%*c",&h,&w,&n);
    10     gets(s);
    11     w1=strlen(s);
    12     h1=1;
    13     n--;
    14     while(n--)
    15     {
    16         gets(s);
    17         l=strlen(s);
    18         if(w1+l+1>w)
    19         {
    20             h1++;
    21             w1=l;
    22         }
    23         else
    24             w1+=(l+1);
    25         if(h1>h)
    26         {
    27             sum++;
    28             h1=1;
    29         }
    30     }
    31     printf("%d\n",sum);
    32     return 0;
    33 }

     

  • 相关阅读:
    [Bilingual]魔术农庄里的不变量 Invariants in Magic Farm
    包络线与对偶曲线
    【翻译】拓扑四日谈
    几何观止(经典几何对象)
    [Bilingual] Half of Adcanced Algebra 半本高代习题集
    Luis A. Caffarelli教授的出版作品【1】
    Luis A. Caffarelli教授的出版作品【2】
    Luis A. Caffarelli教授的出版作品【3】
    Untitled
    白云先生推荐书单之夷狄篇
  • 原文地址:https://www.cnblogs.com/pony1993/p/2614496.html
Copyright © 2011-2022 走看看