2747. Count Zero Request Servers
You are given an integer
n
denoting the total number of servers and a 2D 0-indexed integer arraylogs
, wherelogs[i] = [server_id, time]
denotes that the server with idserver_id
received a request at timetime
.You are also given an integer
x
and a 0-indexed integer arrayqueries
.Return a 0-indexed integer array
arr
of lengthqueries.length
wherearr[i]
represents the number of servers that did not receive any requests during the time interval[queries[i] - x, queries[i]]
.Note that the time intervals are inclusive.
c++
1 | class Solution { |