文件名称:3
-
所属分类:
- 标签属性:
- 上传时间:2015-03-23
-
文件大小:200.39kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
题目描述:
“臭味相投”——这是我们描述朋友时喜欢用的词汇。两个人是朋友通常意味着他们存在着许多共同的兴趣。然而作为一个宅男,你发现自己与他人相互了解的机会并不太多。幸运的是,你意外得到了一份北大图书馆的图书借阅记录,于是你挑灯熬夜地编程,想从中发现潜在的朋友。
首先你对借阅记录进行了一番整理,把N个读者依次编号为1,2,…,N,把M本书依次编号为1,2,…,M。同时,按照“臭味相投”的原则,和你喜欢读同一本书的人,就是你的潜在朋友。你现在的任务是从这份借阅记录中计算出每个人有几个潜在朋友。
输入:
每个案例第一行两个整数N,M,2 <= N ,M<= 200。接下来有N行,第i(i = 1,2,…,N)行每一行有一个数,表示读者i-1最喜欢的图书的编号P(1<=P<=M)
输出:
每个案例包括N行,每行一个数,第i行的数表示读者i有几个潜在朋友。如果i和任何人都没有共同喜欢的书,则输出“BeiJu”(即悲剧,^ ^)-Topic descr iption: " like-minded" - this is when we describe friends like to use the vocabulary. Two people are friends usually means they exist many common interests. However, as an otaku, you find yourself with others, not too many opportunities for mutual understanding. Fortunately, you accidentally got a Peking University Library to borrow books record, so you stay up late at night to the programming, which would like to find potential friends. First you have to borrow a lot of sorting records, the N readers are numbered 1,2, ..., N, the M book are numbered 1,2, ..., M. Meanwhile, according to " like-minded" principle, and you like to read the same book, is to your potential friend. Your task now is to borrow this record calculated for each person has several potential friends. Input: The first line in each case two integers N, M, 2 < = N, M < = 200. Then there are N row, i (i = 1,2, ..., N) rows each row has a number indicating the reader i-1 favorite book nu
“臭味相投”——这是我们描述朋友时喜欢用的词汇。两个人是朋友通常意味着他们存在着许多共同的兴趣。然而作为一个宅男,你发现自己与他人相互了解的机会并不太多。幸运的是,你意外得到了一份北大图书馆的图书借阅记录,于是你挑灯熬夜地编程,想从中发现潜在的朋友。
首先你对借阅记录进行了一番整理,把N个读者依次编号为1,2,…,N,把M本书依次编号为1,2,…,M。同时,按照“臭味相投”的原则,和你喜欢读同一本书的人,就是你的潜在朋友。你现在的任务是从这份借阅记录中计算出每个人有几个潜在朋友。
输入:
每个案例第一行两个整数N,M,2 <= N ,M<= 200。接下来有N行,第i(i = 1,2,…,N)行每一行有一个数,表示读者i-1最喜欢的图书的编号P(1<=P<=M)
输出:
每个案例包括N行,每行一个数,第i行的数表示读者i有几个潜在朋友。如果i和任何人都没有共同喜欢的书,则输出“BeiJu”(即悲剧,^ ^)-Topic descr iption: " like-minded" - this is when we describe friends like to use the vocabulary. Two people are friends usually means they exist many common interests. However, as an otaku, you find yourself with others, not too many opportunities for mutual understanding. Fortunately, you accidentally got a Peking University Library to borrow books record, so you stay up late at night to the programming, which would like to find potential friends. First you have to borrow a lot of sorting records, the N readers are numbered 1,2, ..., N, the M book are numbered 1,2, ..., M. Meanwhile, according to " like-minded" principle, and you like to read the same book, is to your potential friend. Your task now is to borrow this record calculated for each person has several potential friends. Input: The first line in each case two integers N, M, 2 < = N, M < = 200. Then there are N row, i (i = 1,2, ..., N) rows each row has a number indicating the reader i-1 favorite book nu
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Cpp1.cpp
Debug/
Debug/Cpp1.exe
Debug/Cpp1.ilk
Debug/Cpp1.obj
Debug/Cpp1.pch
Debug/Cpp1.pdb
Debug/vc60.idb
Debug/vc60.pdb
Debug/
Debug/Cpp1.exe
Debug/Cpp1.ilk
Debug/Cpp1.obj
Debug/Cpp1.pch
Debug/Cpp1.pdb
Debug/vc60.idb
Debug/vc60.pdb
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.