QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#201193#5152. Circular Caramel Cookienameless_story#WA 1ms3696kbC++20397b2023-10-05 13:04:572023-10-05 13:04:58

Judging History

你现在查看的是最新测评结果

  • [2023-10-05 13:04:58]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3696kb
  • [2023-10-05 13:04:57]
  • 提交

answer

#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
int main()
{
	ios::sync_with_stdio(0); cin.tie(0);
	cout<<fixed<<setprecision(15);
	ll n,l=1,r=1e10,mid,i;
	cin>>n;
	while (l<r)
	{
		mid=l+r>>1;
		ll res=0;
		for (i=1; i*i<=mid; i++) res+=(ll)sqrtl(mid-i*i);
		if (res*4>=n) r=mid; else l=mid+1;
	}
	cout<<sqrt(l)<<endl;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3628kb

input:

11

output:

2.236067977499790

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

59

output:

5.000000000000000

result:

ok found '5.0000000', expected '5.0000000', error '0.0000000'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

1

output:

1.414213562373095

result:

ok found '1.4142136', expected '1.4142136', error '0.0000000'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3696kb

input:

2

output:

1.414213562373095

result:

ok found '1.4142136', expected '1.4142136', error '0.0000000'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

3

output:

1.414213562373095

result:

ok found '1.4142136', expected '1.4142136', error '0.0000000'

Test #6:

score: -100
Wrong Answer
time: 1ms
memory: 3624kb

input:

4

output:

1.414213562373095

result:

wrong answer 1st numbers differ - expected: '2.2360680', found: '1.4142136', error = '0.3675445'