|
|
| Show all threads Hide all threads Show all messages Hide all messages | | Think of what makes sum even or odd | yaustal | 1924. Four Imps | 11 Sep 2026 01:51 | 1 | #include <iostream> int main() { int n; std::cin >> n; n = n % 4; if (n == 2 || n == 1) { std::cout << "grimy"; } else { std::cout << "black"; } } only amount of odd numbers matters and it changes every 2 numbers so for 1, 2 - 1 odd for 3, 4 - 2 odd numbers and so on | | Hint: think if sum even or odd | denxxjkee | 1924. Four Imps | 25 May 2024 20:42 | 1 | | | hint | Rodion | 1924. Four Imps | 6 Aug 2020 20:30 | 1 | hint Rodion 6 Aug 2020 20:30 no matter who plays first and which sign is between numbers | | Question about the task Вопрос по условию задачи | mmd18cury | 1924. Four Imps | 2 Oct 2018 10:04 | 2 | Do I uderstand it right, that numbers are placed in increasing order, there's nothing said about it??? Правильно понимаю, что числа должны быть в порядке возрастания? Yes, they are in ascending order. Edited by author 02.10.2018 10:05 | | Тест №11? Или "50 тестов вручную" | Aleksandr | 1924. Four Imps | 18 Jan 2017 02:22 | 2 | Други, кто-нибудь знает что это за несчастный тест? Проверил программу ВРУЧНУЮ в экселе для всех 50 значений "n", и всё сошлось. What's the problem? [code deleted] Edited by moderator 19.11.2019 22:58 | | HINT | IlushaMax | 1924. Four Imps | 8 Mar 2016 16:19 | 1 | HINT IlushaMax 8 Mar 2016 16:19 Use properties of arithmetic progression | | a tip | fangcun | 1924. Four Imps | 24 Nov 2014 18:58 | 1 | a tip fangcun 24 Nov 2014 18:58 You can use DFS find the tips as this. [code deleted] Edited by moderator 19.11.2019 22:57 | | has anybody solved it? | cena | 1924. Four Imps | 23 Mar 2013 03:03 | 2 | Edited by author 18.03.2013 20:26 Edited by author 18.03.2013 20:26 Edited by author 18.03.2013 20:26 Yes, it obvious Hint V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V Try each way to play the game on 3 and 4 numbers on paper, than you will find what's the best strategy. | | nu va mai uitati la raspunsuri | tudorfrent | 1924. Four Imps | 1 Nov 2012 14:42 | 1 | Edited by author 01.11.2012 14:44 Edited by author 01.11.2012 14:45 |
|
|
|