题目如下: Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes a post on Weibo, all his/her foll…
1076 Forwards on Weibo (30分)   Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes a post o…
题目信息 1076. Forwards on Weibo (30) 时间限制3000 ms 内存限制65536 kB 代码长度限制16000 B Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with follo…
题目如下: A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. Starting from one root supplier, everyone on the chain buys products from one's supplier in…
Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes a post on Weibo, all his/her followers…
题目 Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes a post on Weibo, all his/her followe…
时间限制 3000 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers…
Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes a post on Weibo, all his/her followers…
题目大意:给出每个用户id关注的人,和转发最多的层数L,求一个id发了条微博最多会有多少个人转发,每个人只考虑转发一次.用BFS,同时每个节点要记录下所在的层数,由于只能转发一次,所以每个节点要用vis判断之前是否入过队列,不能重复入队. #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <cmath> #include…
题意: 输入两个正整数N和L(N<=1000,L<=6),接着输入N行数据每行包括它关注人数(<=100)和关注的人的序号,接着输入一行包含一个正整数K和K个序号.输出每次询问的人发出消息经过至多L层转发最多有多少人转发. trick: 逻辑搞错的程序也能得到25或28分... AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ][]; ve…