Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Problem with lower_bound() function
Difference between en1 and en2, changed 11 character(s)
Today I tried to solve Problem D(div2) of last Contest ( [contest:556] ). In this problem I used lower_bound() function on a set of pair of pair and int ( `set< pair< pair<long long, long long> , int > >` ). Here is my ACed submission [submission:11834954] and my TLE submission [submission:11835029] . I don't know why I get TLE in second code. :S↵

Ok, Let me explain what I 've done here,↵
I have a set like `set< pair< pair<long long, long long> , int > > bridges` on which I tried to apply lower_bound() function ( in line number 171 in my both code ). In first submission I used lower_bound() as like `bridges.lower_bound(make_pair(keyValue,0LL))` and I got AC. But in my second code I used lower_bound() as like `lower_bound(bridges.
firstbegin(),bridges.secoend(),make_pair(keyValue,0LL))` and I got TLE on case 11.↵

What is the difference between calling lower_bound() function in above mentioned 2 way ? 

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English sonjoydabnath 2015-06-29 14:05:51 11 Tiny change: 'd(bridges.first(),bridges.second(),make_' -> 'd(bridges.begin(),bridges.end(),make_'
en1 English sonjoydabnath 2015-06-29 14:02:39 945 Initial revision (published)