文件名称:3
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
题目描述:
“臭味相投”——这是我们描述朋友时喜欢用的词汇。两个人是朋友通常意味着他们存在着许多共同的兴趣。然而作为一个宅男,你发现自己与他人相互了解的机会并不太多。幸运的是,你意外得到了一份北大图书馆的图书借阅记录,于是你挑灯熬夜地编程,想从中发现潜在的朋友。
首先你对借阅记录进行了一番整理,把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
.....\Cpp1.exe
.....\Cpp1.ilk
.....\Cpp1.obj
.....\Cpp1.pch
.....\Cpp1.pdb
.....\vc60.idb
.....\vc60.pdb