From 4ccfa83767864b5afd6de9ffc5d958e13d8e157b Mon Sep 17 00:00:00 2001 From: Jay Welborn Date: Wed, 17 Oct 2018 10:19:23 +0200 Subject: [PATCH] Update BirthdayParty.txt Wrap lines for easier reading in GitHub's Code Viewer --- ASSIGNMENTS/BirthdayParty.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ASSIGNMENTS/BirthdayParty.txt b/ASSIGNMENTS/BirthdayParty.txt index 7551a972..58d7e553 100644 --- a/ASSIGNMENTS/BirthdayParty.txt +++ b/ASSIGNMENTS/BirthdayParty.txt @@ -1,11 +1,17 @@ -Chef has invited his friends on his birthday party. There are total N friends that are coming at his home. You are given the arriving and leaving time of each friend and Q queries. Each Query consists of an integer t, you have to output the number of friends that are present at time t at Chef's home. +Chef has invited his friends on his birthday party. There are total N friends that are +coming at his home. You are given the arriving and leaving time of each friend and Q +queries. Each Query consists of an integer t, you have to output the number of friends +that are present at time t at Chef's home. Input The first line contains T, the number of testcases. -The first line of each testcase contain two space separated integers N and Q, then follow N lines containing two space separated integers ai bi, the arriving and leaving time of ith friend respectively. +The first line of each testcase contain two space separated integers N and Q, then +follow N lines containing two space separated integers ai bi, the arriving and leaving +time of ith friend respectively. -Next Q lines contains a single integer t asking the number of friends at Chef's house present at time t. +Next Q lines contains a single integer t asking the number of friends at Chef's house +present at time t. Output For each query, output the required answer in a new line. @@ -30,4 +36,4 @@ Input: Output: 1 3 -1 \ No newline at end of file +1