当前位置:天才代写 > C++/C代写,c语言代写代考-100%安全,包过 > 代写C++困难大赛题目: ICPC(ACM 国际大学生程序设计竞赛

代写C++困难大赛题目: ICPC(ACM 国际大学生程序设计竞赛

2018-01-06 08:00 星期六 所属: C++/C代写,c语言代写代考-100%安全,包过 浏览:647

 ICPC(ACM 国际大学生程序设计竞赛



where n is the number of nodes in the tour.

Miroslava works for a computer security company and it is time to renew a shared cryptographic key in many data centres across Europe. To do this, Miroslava is going to rent a private jet and deliver the key to employees waiting at all major European airports. She wants to be back as soon as possible.

Miroslava's company has a computer that is able to execute p billions of operations per second. Since we can approximate Europe by a two-dimensional plane, we assume that the Arora-Mitchell

algorithm runs for exactly

p

n(log2 n)c  2

p  109

seconds on this computer to produce the exact (1 + 1=c)-approximation of the optimal tour. Miroslava noticed that c is a parameter of the algorithm that can be used to her advantage, but

one also needs to be very careful when choosing the right value. If she sets c too low, the algorithm will  nish very fast but the time she spends ying around Europe will be too long. On the other hand, setting it too high will force her to wait for an answer from the computer, while she could be ying instead.

Miroslava used to work in a different company and from there she knows that the optimal tour of all major European airports is s meters long, but she wasn't ranked high enough in the company to know the actual tour. Given the speed v of the private jet in meters per second, Miroslava needs s(1 + 1=c)=v seconds to complete the tour produced by the algorithm run with parameter c. For the sake of simplicity, we assume that Miroslava can land, leave a copy of the private key and take off from each airport in an instant.

How long does it take Miroslava to  rst run the algorithm and then distribute all the keys, assuming that she chooses the optimal parameter c?

Input

The input  le contains several test cases, each of them as described below. The input consists of one line with four numbers:

 

);

 

n(log n)O((cpd)d  1

 

The famous Arora-Mitchell approximation algorithm for the Euclidean Travelling Salesman Problem (Euclidean TSP) was discovered independently by Sanjeev Arora and Joseph S. B. Mitchell in 1998. It can approximate the value of an optimal TSP tour in d dimensions within a factor of 1 + 1c in running time

 

an integer n (4   n   1000000), the number of airports;

 

a real number p (0:001 p 5000), the number of billions of operations the computer can execute per second;

 

a real number s (106    s   109), the length of the optimal tour of all European airports in meters;

 

a real number v (50   v   900), the speed of the private jet in meters per second.

 

All real numbers will have at most 10 digits after the decimal point.

 

Output

 

For each test case, output one line with the shortest possible time t in seconds to distribute the keys and the value of the parameter c Miroslava should use to achieve time t. Your answer should have an absolute or relative error of at most 10 6.

 

Sample Input

 

10 8.9 40075000 272.1

 

47 4.2 1337102.4 256

 

Sample Output

 

157079.04857106 15.598261092309

 

5836.2936298227 8.9113418228146

代写计算机编程类/金融/高数/论文/英文


  u=199783060,2774173244&fm=58&s=188FA15AB1206D1108400056000040F6&bpow=121&bpoh=75.jpgalipay_pay_96px_533896_easyicon.net.pngpaypal_96px_533937_easyicon.net.pngchina_union_pay_96px_533911_easyicon.net.pngmastercard_pay_96px_533931_easyicon.net.pngasia_pay_96px_533902_easyicon.net.png

本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝或者Upwork交易!

E-mail:850190831@qq.com   微信:BadGeniuscs  工作时间:无休息工作日-早上8点到凌晨3点


如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。

qr.png

 

    关键字:

天才代写-代写联系方式