How to solve K, C?
# | 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 | 150 |
How to solve K, C?
Name |
---|
How to solve L?
First, check what if a = 0 or c = 0
then if b is max and it's equal to F_{i+1} then D = b2 - 4ac = (Fi + fi - 1)2 - 4fifi - 1 = (fi - fi - 1)2 that is usually greater than 0, and zero if fi = fi - 1 i.e i = 2
otherwise D < 0 and there's no solutions.
fi2 - 4fi + 2fi + 1 < fi2 - 4fifi < 0
fi2 - 4fi + 1fi - 1 = fi2 - fi + 1fi - 1 - 3fi + 1fi - 1 = ± 1 - 3fi + 1fi - 1 ≤ - 2 < 0
Which C? It is better if organizers do not name different tasks with same letters.
G. How did you solved it?
After splitting to sentences I tried to grep them with regex, but got TLE 29 (ideone).
Then tried use hashes, but failed on TC#3 (give a hint). Can't overcome it in two ways: 1) take each sentence as a hash key, which value is a hash of lowercased words;(ideone) 2) each word from sentences is lowercased and is a hash key, which value is an array of indices of an array of sentences.(ideone).
Later improved(maybe) regex solution with lookaheads, but there is no Upsolving for Div.2 :/ to test if it pass time limits (ideone).