I’m getting TLE by using thid code https://ide.codingblocks.com/s/354554
Coding Blocks IDE
Coding Blocks Online IDE | Run and check your code
Its working here, but while submitting its give TLE.
pls check input format of the problem and read input accordingly.
also in ur current code u r assuming that l1>l2(u are calculating difference using them) which is not true for all cases.
for cases l1<l2 diff will be negative so consider this case as well
@coder_girl
i think input and output is already handled u only need to write logic for detecting intersection.
after handling this case try to submit it here->
https://hack.codingblocks.com/app/contests/1873/1334/problem
not working
here i have updated my code still not working while shubmitting (TLE).
try to submit it here.
please check my code.It already handled.