啊这是个情感问题我要考研了所以情感问题考研一定要过六级吗解决(ಡωಡ)

Noncommutative geometry, quantum fields and motives - Connes &_Noncommutative geometry, quantum fields and motives - Connes &免费下载_爱问共享资料
(window.slotbydup=window.slotbydup || []).push({
id: '2370785',
container: s,
size: '146,102',
display: 'inlay-fix'
Noncommutative geometry, quantum fields and mot…
简介:noncommutative geometry
Noncommutative geometry, quantum fields and motives - Connes &.pdf
Noncommutative geometry, quantu…
简介:noncommutative geometry
非对易几何、场论。又是一部大部头,对数学要求较高,尤其是代数。
非交换几何与量子域
Noncommutative Geometry(Connes)
当前资料暂无简介~
Structural Aspects of Quantum Field Theory and Noncommutative Geometry, Gerhard Grensing, 2 volumes, 2013
Noncommutative Geometry and Number Theory, Where Arithmetic meets Geometry and Physics, Consani, Marcolli, Vi…
Quantum Groups and Noncommutative Spaces, Perspectives on Quantum Geometry, Marcolli, Parashar
当前资料暂无简介~
Connes的非交换几何
非交换几何
Weiss, QDS, 2ed
Cambrige Press
Sobolev spaces 2nd 2003 Adams, Robert A.; Fournier, John J. F.
infinity and Galois theory
princeton lectures in analysis---functional analysis__stein
a wonderful book
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
刚刚上传了
在此可输入您对该资料的评论~
资料阅读排行
请选择举报的类型
赌博犯罪类
资料评价:
所需积分:0HDU 3233-Download Manager-模拟-[解题报告]HOJ
HDU 3233-Download Manager-模拟-[解题报告]HOJ
, 围观829次
Download Manager
问题描述 :
Jiajia downloads a lot, a lot more than you can even imagine. Some say that he starts downloading up to 20,000 files together. If 20,000 files try to share a limited bandwidth then it will be a big hazard and no files will be downloaded properly. That is why, he uses a download manager.
If there are T files to download, the download manger uses the following policy while downloading files:
1. The download manager gives the smaller files higher priority, so it starts downloading the smallest n files at startup. If there is a tie, download manager chooses the one with less bytes remaining (for download). We assume that with at least 50 Mega Bytes/sec of bandwidth, n files can be downloaded simultaneously without any problem.
2. The available bandwidth is equally shared by the all the files that are being downloaded. When a file is completely downloaded its bandwidth is instantaneously given to the next file. If there are no more files left except the files that are being downloaded, this bandwidth is immediately shared equally by all remaining files that are being downloaded.
Given the size and completed percentage of each file, your task is to intelligently simulate the behavior of the download manager to find the total time required to download all the files.
The will be at most 10 test cases. Each case begins with three integers T (1 &= T &= 20000), n (1 &= n &= 2000 and 1 &= n &= T) and B (50 &= B &= 1000). Here B denotes the total bandwidth available to Jiajia (In Megabytes/sec). Please note that the download manager always downloads n files in parallel unless there are less than n files available for download. Each of next T lines contains one non-negative floating-point number S (less than 20,000, containing at most 2 digits after the decimal places) and one integer P (0 &= P &= 100). These two numbers denote a file whose size is S megabyte and which has been downloaded exactly P% already. Also note that although theoretically it is not possible that the size of a file or size of its remaining part is a fraction when expressed in bytes, for simplicity please assume that such thing is possible in this problem. The last test case is followed by T=n=B=0, which should not be processed.
The will be at most 10 test cases. Each case begins with three integers T (1 &= T &= 20000), n (1 &= n &= 2000 and 1 &= n &= T) and B (50 &= B &= 1000). Here B denotes the total bandwidth available to Jiajia (In Megabytes/sec). Please note that the download manager always downloads n files in parallel unless there are less than n files available for download. Each of next T lines contains one non-negative floating-point number S (less than 20,000, containing at most 2 digits after the decimal places) and one integer P (0 &= P &= 100). These two numbers denote a file whose size is S megabyte and which has been downloaded exactly P% already. Also note that although theoretically it is not possible that the size of a file or size of its remaining part is a fraction when expressed in bytes, for simplicity please assume that such thing is possible in this problem. The last test case is followed by T=n=B=0, which should not be processed.
Case 1: 0.66
Case 2: 0.00
Explanation
In the first sample, there are 6 files and the download manager can download 3 files simultaneously. The size of the smallest file is 40.40 Megabyte but there are
four such files (2nd, 4th, 5th and 6th files). So the download manager chooses the 6th, 5th and 4th files for download as they have less bytes remaining. All these
files get equal bandwidth (30.00 Megabyte/Sec). Of these three files the 8th file is finished first. So instantaneously the 2nd file starts downloading. Then, 5th file
is finished. So the next larger file (3rd file) starts downloading. This process goes on until all files are downloaded.
题目链接:
题目大意: 给你一些文件,要你下载。 &可是你家的下载带宽是有限的,而且你的下载器一次能下载的文件个数也是有限的。而且你下载文件时要按照文件从小到大来下,如果有文件大小相同,则按文件剩余的大小从小到大来下。问你下完所有文件要多久时间。 还有一点就是下载的带宽要平均分掉。
算法分析: 可以直接弄出答案就所有文件下完时间。当然我是用模拟的,所以写写报告。
程序代码:
方法1: 普通版
#include&cstdio&
int main()
int T,n,cnt = 1,B;
while(scanf(&%d%d%d&,&T,&n,&B),(T || n || B))
double s,p,sum = 0;
while(T--)
scanf(&%lf%lf&, &s, &p);
sum += s*(1.0-p/100.0);
printf(&Case %d: %.2f\n\n&,cnt++,sum/(B*1.0));
方法2: 找抽版,模拟
#include&cstdio&
#include&cstring&
#include&algorithm&
#define N 200010
struct Node
double size,
Node node[N];
int cmp(Node a, Node b)
if(a.size != b.size)
return a.size & b.
return a.p & b.p;
int main()
int T,n,B,cas = 1;
while(scanf(&%d%d%d&, &T,&n,&B) && (T||n||B))
for(int i = 1; i &= T; i++)
scanf(&%lf%d&, &node[i].size,&node[i].p);
node[i].rest = 1.0*node[i].size*(1.0-0.01*node[i].p);
sort(node+1,node+1+T,cmp); //按下载要求来排列下载次序
double time = 0,M = (double)B;
for(int j = 1; j &= T; j++)
int q = j+n-1;
//如果剩余的个数少于n个,平均带宽为M/(T-j+1)
time += (node[j].rest / (M/((T-j+1)*1.0)));
for(int i = j+1 ; i &= T ; i++)
node[i].rest -= node[j].
//如果剩余个数不小于n个,剩余带宽为M/n
time += (node[j].rest / (M/(n*1.0)));
for(int i = j+1 ; i &= i++)
node[i].rest -= node[j].
printf(&Case %d: %.2f\n\n&,cas++,time);
参考:http://blog.csdn.net/runningapple/article/details/8944964
您可能还会对这些文章感兴趣!}

我要回帖

更多关于 考研一定要学士学位吗 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信