感谢 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;
}
2 条评论
DepletedPrism · 2020年3月7日 10:49 下午
¿
Remmina · 2020年3月8日 9:53 上午
此题不可做,别纠结了,做出来锻炼意义也不。(除非想装×)