ICode9

精准搜索请尝试: 精确搜索
  • Codeforces Round #646 (Div. 2) C. Game On Leaves (贪心,博弈)2020-06-04 13:56:55

    题意:给你一棵树,每次可以去掉叶节点的一条边,Ayush先开始,每回合轮流来,问谁可以第一个把\(x\)点去掉. 题解:首先如果\(x\)的入度为\(1\),就可以直接拿掉,还需要特判一下入度为\(0\)的情况,否则,仔细想一想,因为每次都不想让对方赢,所以摘到最后,一定会出现\(x\)连的都是叶

  • 6.3每日一题题解2020-06-03 09:07:24

    Game On Leaves 题目链接:[https://codeforces.com/contest/1363/problem/C) 涉及知识点: 思维/博弈 solution: 首先我们要知道无根树的概念(就是任何一个节点都能当做根),然后仔细审题 接下来你会发现,无论如何变化,最终和X 有关系的只是,最后两个与X相连的节点, 设置 第一个节点为x1

  • C. Game On Leaves2020-06-01 22:54:16

    Ayush and Ashish play a game on an unrooted tree consisting of nn nodes numbered 11 to nn. Players make the following move in turns: Select any leaf node in the tree and remove it together with any edge which has this node as one of its endpoints.

  • Codeforces Round #646 (Div. 2) C. Game On Leaves(贪心/博弈)2020-06-01 20:58:10

    Ayush and Ashish play a game on an unrooted tree consisting of nn nodes numbered 11 to nn. Players make the following move in turns: Select any leaf node in the tree and remove it together with any edge which has this node as one of its endpoints. A leaf

  • Codeforces--665B--Shopping2020-03-12 20:02:25

    题目描述: Ayush is a cashier at the shopping center. Recently his department has started a ''click and collect" service which allows users to shop online. The store contains k items. n customers have already used the above service. Each user pa

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有