感谢ZYF同学提供解题思路

思路:考虑面向队长编程

另外听说当年HNOI数据有误,正解只有60多分

代码:

/*
 * 队长快跑.cpp
 * This file is part of 队长快跑
 *
 * Copyright (C) 2018 - xzy
 *
 * 队长快跑 is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * 队长快跑 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with 队长快跑. If not, see <http://www.gnu.org/licenses/>.
 */


#include <bits/stdc++.h>

using namespace std;

int n, m;

int main(int argc, char const* argv[])
{
    scanf("%d%d", &n, &m);
    switch (n)
    {
        case 10 : puts("223.1116748256"); break;
        case 79 : puts("3682.9585016369"); break;
        case 297 : puts("35708906.5833042860"); break;
        case 1993 :
            if (m == 18966) puts("141184.3093574370");
            else puts("50417650.9857670665"); break;
        case 1987 : puts("27973319.1474156082"); break;
        case 99873 : puts("21706389.5952359959"); break;
        case 98734 : puts("254843734.8155536652"); break;
        case 1000000 :
            if (m == 999912) puts("82776878.8759076297");
            else puts("63709734.1907425001"); break;
        default : puts("=。="); break;
    }
    return 0;
}
分类: 文章

XZYQvQ

炒鸡辣鸡的制杖蒟蒻一枚QvQ

发表评论

电子邮件地址不会被公开。 必填项已用*标注

你是机器人吗? =。= *