| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | adamant | 152 |
| 3 | Proof_by_QED | 146 |
| 3 | Um_nik | 146 |
| 5 | Dominater069 | 144 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
| Name |
|---|



Where to start from.... Error and your output clearly says that you don't print anything.
Let's see what
findreturns. It's returns value of typesize_t, which is index of position if found orstring::nposotherwize.nposis-1. ClickYou assign
size_tvalue toll = long long. Problem 1 issize_tandlong longnot same types (first is unsigned type, second if signed). Problem 2 that is not guaranteed that they have same size.In concrete your case it seems that
size_tisunsigned int 32type andlong longissigned int 64. You assign-1 of unsigned int 32which is2^32 - 1 of unsigned int 32tosigned int 64variable.Assignment of different types. Right value must be converted to same type with left value before assignment. In the left
signed int 64, in the rightunsigned int 32. Right value type strictly smaller than left value type, so conversion can be made without loss. So after assignmentabecome2^32 - 1 of signed int 64. And compare2^32 - 1 of signed int 64with-1 of signed int 32never returns true. So you never print.In other machines can be that
size_tisunsigned int 64andlong longissigned int 64. Then rules are harder but in general in that case your code will work as expected.Just do
if (str.find(arr[i]) == string::npos)and it will print answer (left value issize_tand right value issize_ttoo).P.S. Don't know why downvotes. Question is good and I guess there are many people that don't know about that problems.