This might be trivial for most users, but here goes.
To find the index of the rightmost 1 in a monotonic function
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 151 |
Yet Another Binary Search Implementation
This might be trivial for most users, but here goes.
To find the index of the rightmost 1 in a monotonic function
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en24 | jeqcho | 2021-02-19 17:05:48 | 26 | |||
en23 | jeqcho | 2021-02-19 16:59:06 | 46 | |||
en22 | jeqcho | 2021-02-19 16:56:04 | 10 | Tiny change: 'he answer (`lef-1`) is the la' -> 'he answer is the la' | ||
en21 | jeqcho | 2021-02-19 16:47:18 | 438 | Applied improvements thanks to [user:sergei_popov] | ||
en20 | jeqcho | 2021-02-19 09:59:01 | 0 | (published) | ||
en19 | jeqcho | 2021-02-19 09:58:24 | 33 | Tiny change: '08687]\n\nIndee' -> '08687]\n\n- 237C [submission:107914994]\n\nIndee' | ||
en18 | jeqcho | 2021-02-19 09:55:01 | 73 | |||
en17 | jeqcho | 2021-02-19 09:54:14 | 3 | |||
en16 | jeqcho | 2021-02-19 09:53:34 | 4 | Tiny change: 't problem C2)\n\n- [' -> 't problem 1486C2)\n\n- [' | ||
en15 | jeqcho | 2021-02-19 09:53:10 | 7 | Tiny change: '107906435]\n\n- [sub' -> '107906435] (367C)\n\n- [sub' | ||
en14 | jeqcho | 2021-02-19 09:52:46 | 7 | Tiny change: '107908687]\n\nIndeed' -> '107908687] (604B)\n\nIndeed' | ||
en13 | jeqcho | 2021-02-19 09:49:12 | 28 | Tiny change: 'nd `rig`. If $a$ i' -> 'nd `rig`. `lef` is set out of bounds. If $a$ i' | ||
en12 | jeqcho | 2021-02-19 09:46:20 | 22 | |||
en11 | jeqcho | 2021-02-19 09:43:39 | 1 | |||
en10 | jeqcho | 2021-02-19 09:42:50 | 80 | |||
en9 | jeqcho | 2021-02-19 09:33:43 | 30 | |||
en8 | jeqcho | 2021-02-19 09:31:45 | 94 | Tiny change: ',a+n,-1)-a; // get i' -> ',a+n,-1)-a-1; // get i' | ||
en7 | jeqcho | 2021-02-19 09:24:13 | 264 | Tiny change: 'e. If `a` can be co' -> 'e. If `a` is available or can be co' | ||
en6 | jeqcho | 2021-02-19 09:16:14 | 8 | Tiny change: '`mid+1`, `lef+1` etc.\n\' -> '`mid+1`, `rig-1` etc.\n\' | ||
en5 | jeqcho | 2021-02-19 08:24:52 | 258 | Tiny change: '0, rig = n-1;\nwhile(l' -> '0, rig = n;\nwhile(l' | ||
en4 | jeqcho | 2021-02-19 08:04:27 | 316 | Tiny change: ' $\log N$.' -> ' $\log N$. Thanks to [user:marvenlee] for inspiring this blog.' | ||
en3 | jeqcho | 2021-02-19 07:42:06 | 3 | |||
en2 | jeqcho | 2021-02-19 07:40:07 | 1015 | Tiny change: '$a=[1,1,1,1,0,0,0]$\n' -> '$a=[1,1,1,$**$1$**$,0,0,0]$\n' | ||
en1 | jeqcho | 2021-02-19 07:15:15 | 157 | Initial revision (saved to drafts) |
Name |
---|