博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
H-index因素
阅读量:6940 次
发布时间:2019-06-27

本文共 2888 字,大约阅读时间需要 9 分钟。

Problem Description

Paper quality and quantity have long been used to measure a research's scientific productivity and scientific impact. Citation, which is the total times a paper has been cited, is a common means to judge importance of a paper. However, with all these factors varying, a collegiate committee has problems when judging which research is doing better. For this reason, H-index is proposed and now widely used to combine the above factors and give accurate judgement. H-index is defined as:
A scientist has index h if h of [his] Np papers have at least h citations each, and the other(Np-h) papers have at most h citations each.
In other words, a scholar with an index of h has published h papers each of which has been cited by others at least h times. Note that H-index is always an integer. It's said that achiveing H-index of 18 means one is fully quality to be a professor, and H-index of 45 or higher could mean membership in the United States Academy of Sciences.
You are to calculate the H-index for all the researchers in the list, base on the given information.

Input

There are multiple scenarios in the input, terminated by a single zero(0).
Each of the scenarios begin with an integer N(1<=N<=100), means that there are N papers. N lines follow, each contain a string(not exceeding 20 characters long), representing the author of the corresponding paper, without white spaces in-between. Though it would be common for one paper written by several authors, there would be exactly one author of each of these papers. Finally, there are N lines of strings, containing '0's and '1's. If the j-th character in the i-th line is '1', it means the i-th paper cites the j-th paper. A paper could never cite itself.

Output

For each scenario, output as many lines as the number of authors given. Each line contains the author's name and his H-index. The list should be sorted first by H-index in descending order, than by name in alphabetic order(Actually, ASCII order. So 'B' is prior to 'a').
Output a blank line after each scenario.

Sample Input

4PeterPeterBobBob00001000110001000

Sample Output

Peter 2Bob 0
 
//小明的H-index表示小明发表的论文中至少有H篇论文,这H篇论文每篇至少引用H次 #include
#include
#include
#include
#include
using namespace std;struct input{ string s; int b;}a[110];struct output{ string s; int b;}c[110];bool cmp(input x,input y){ if(x.s==y.s) return x.b>y.b; else return x.s
y.b;}int main(){ //freopen("a.txt","r",stdin); int n; while(cin>>n&&n) { int k,i,len,j; for(i=0;i
>a[i].s; c[i].b=a[i].b=0; } for(i=0;i
0) { if(m[len-1]-'0'==1&&i!=len-1) a[len-1].b++; //计算每篇论文被引用的数量 len--; } } sort(a,a+n,cmp); for(k=0,i=0;i
c[k].b) c[k].b++; //计算H-index(注意a[i].b是按从大到小排序的) c[k].s=a[i].s; k++; } sort(c,c+k,cm); for(i=0;i

版权声明:本文博客原创文章,博客,未经同意,不得转载。

你可能感兴趣的文章
5月8--我要发,一个值得纪念的日子
查看>>
Java之命令模式(Command Pattern)
查看>>
dom4j 的小小测试
查看>>
hdu - 3572 - Task
查看>>
MySQL存储引擎之InnoDB
查看>>
最短路径
查看>>
C# DateTime 处理
查看>>
分库分表带来的完整性和一致性问题
查看>>
AMD和RequireJS初识----优化Web应用前端(按需动态加载JS)
查看>>
MVC文件上传04-使用客户端jQuery-File-Upload插件和服务端Backload组件实现多文件异步上传...
查看>>
ASP.NET MVC遍历ModelState的错误信息
查看>>
现存问题以及解决方案:在ASP.NET AJAX客户端得到服务器端的DataTable
查看>>
linux关于bashrc与profile的区别(转)
查看>>
文件互斥
查看>>
成为一名优秀程序员所需要知道的那些事
查看>>
Java回顾之Spring基础
查看>>
在UIImageView中旋转图像代码例子
查看>>
写商业计划书的建议
查看>>
项目的阶段性目标管理
查看>>
结构体如何使用NSData包装
查看>>