SP23847 ACMT - Acm Teams

    • 31通过
    • 63提交
  • 题目来源 SPOJ 23847
  • 评测方式 RemoteJudge
  • 标签
  • 难度 普及-
  • 时空限制 1000ms / 1536MB

题解

  • 提示:收藏到任务计划后,可在首页查看。
  • 体验新版界面

    最新讨论 显示

    推荐的相关题目 显示

    题意翻译

    大致题意:

    ACM竞赛要组队, 两个新手和一个高手两个高手和一个新手 可以组成一队,问最多可以组成多少对?

    输入:

    第一行一个整数$t$表示输入样例组数,接下来$t$行每行为一组输入样例,每行有两个数$E$和$N$分别表示高手和新手的总数。

    输出:

    $t$行,每行一个整数,对应输入每组样例的答案。

    数据范围:

    不知道。

    题目描述

    Engineer ahmed sror one of the best coches, He picks team members by using two ways.

    First one that the optimal team of three people should consist of one experienced participant and two newbies. Thus, each experienced participant can share the experience with a large number of people.

    Second one that the optimal team should have two experienced members plus one newbie. Thus, each newbie can gain more knowledge and experience.

    All the teams during the training session should belong to one of the two ways described above. Furthermore,they agree that the total number of teams should be as much as possible.

    There are E experienced members and N newbies on the training session.Can you calculate what maximum number of teams can be formed?

    输入输出格式

    输入格式:

    The first line of the input contains a single integer corresponding to number of test cases t (1 E and N (0 E, N

    输出格式:

    For each test case print a single integer representing the maximum number of teams that can be formed.

    输入输出样例

    输入样例#1: 复制
    2
    2 6
    4 5
    输出样例#1: 复制
    2
    3
    提示
    标程仅供做题后或实在无思路时参考。
    请自觉、自律地使用该功能并请对自己的学习负责。
    如果发现恶意抄袭标程,将按照I类违反进行处理。