/ SB域 /

记录详情

Wrong Answer


  
# 状态 耗时 内存占用
#1 Accepted 3ms 256.0 KiB
#2 Accepted 3ms 256.0 KiB
#3 Accepted 3ms 360.0 KiB
#4 Accepted 3ms 348.0 KiB
#5 Accepted 10ms 360.0 KiB
#6 Accepted 40ms 384.0 KiB
#7 Wrong Answer 69ms 2.375 MiB
#8 Accepted 92ms 2.445 MiB
#9 Accepted 212ms 2.25 MiB
#10 Accepted 2ms 364.0 KiB

代码

#include <iostream>
#include <stdio.h>
#include <algorithm>
#define II int
#define DO double
#define IL inline
#define R register
#define I 5234560
using namespace std;

IL void of(R II &a) {
	R char c=getchar(); R II w=1, p=0;
	while (c<'0' || c>'9') { if(c=='-') w=-1; c=getchar(); }
	while (c>='0' && c<='9') { p=p*10+c-'0'; c=getchar(); }
	a=w*p;
}

/* -------------------- Peipei -------------------- */

II n;
DO ans;
DO T[I];

int main()
{
	of(n);
	for(R II i=1;i<=n;i++) {
		ans+=(DO) ((100-T[i])*4200.0) / (DO) n;
		T[i]=100;
		for(R II j=i+1;j<=n;j++) {
			R DO now=(T[i]+T[j])*0.5;
			if(now<=1e-5) break ;
			T[i]=T[j]=now;
		}
	}
	
	printf("%.2lf\n",ans);
	exit(0);
}

信息

递交者
类型
递交
题目
烧水问题
题目数据
下载
语言
C++
递交时间
2018-02-02 19:05:10
评测时间
2018-02-02 19:05:10
评测机
分数
90
总耗时
443ms
峰值内存
2.445 MiB