Difference between "|", "||", "or" in C++

Revision en1, by rhezo, 2016-06-27 14:33:26

I was solving this problem. I have a function go, which returns a boolean true or false. When I replace "|" with "||", I get AC, otherwise I get TLE on test 6. I get AC with "||" and "or", but TLE with "|". Can anyone tell me the difference between the three?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rhezo 2016-06-27 14:33:26 350 Initial revision (published)