/ SB域 /

记录详情

Wrong Answer


  
# 状态 耗时 内存占用
#1 Accepted 3ms 256.0 KiB
#2 Accepted 3ms 380.0 KiB
#3 Accepted 1ms 352.0 KiB
#4 Wrong Answer 2ms 344.0 KiB
#5 Wrong Answer 9ms 344.0 KiB
#6 Wrong Answer 39ms 384.0 KiB
#7 Wrong Answer 49ms 384.0 KiB
#8 Wrong Answer 125ms 600.0 KiB
#9 Wrong Answer 150ms 744.0 KiB
#10 Accepted 2ms 376.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-4) break ;
			T[i]=T[j]=now;
		}
	}
	
	printf("%.2lf\n",ans);
	exit(0);
}

信息

递交者
类型
递交
题目
烧水问题
题目数据
下载
语言
C++
递交时间
2018-02-02 19:04:54
评测时间
2018-02-02 19:04:54
评测机
分数
40
总耗时
388ms
峰值内存
744.0 KiB