| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Small hint | andreyDagger | 1141. Взлом RSA | 17 ноя 2021 13:58 | 1 |
(p-1)(q-1) is euler function value of n. |
| Some test cases | Smilodon_am [Obninsk INPE] | 2113. Пережить потоп | 16 ноя 2021 18:14 | 3 |
See some test cases below. I hope some of them will help you. 2 5 2 3 9 2 100 1 2 5 4 100 2 1 1 5 ans: 0 5 1 100000 0 1 100000 1 4 1 5 1 ans: 0 5 1 100000 0 1 100000 1 3 1 5 1 ans: 0 5 1 100000 0 1 1 1 4 1 5 1 ans: 100000 5 1 100000 1 1 1 1 4 1 5 1 ans: 99999 3 4 1 2 2 1 1 2 2 1 1 2 2 1 2 1 3 4 ans: 0 For WA16 these cases helped me: 4 6 1 1 1 2 2 2 2 2 2 3 3 3 4 4 4 4 4 4 4 5 5 5 5 4 2 2 3 1 ans: -1 4 6 1 1 1 2 2 2 2 2 2 3 3 3 4 4 4 4 4 4 4 5 5 5 5 4 2 3 3 1 ans: 1 |
| WA 4 | andreyDagger | 1651. Кратчайшая подцепь | 16 ноя 2021 10:29 | 1 |
WA 4 andreyDagger 16 ноя 2021 10:29 |
| You don't need to read the array into memory ;) | vnikulin | 2141. Саша Вилкин | 13 ноя 2021 12:49 | 1 |
It's strange that it has a tag "DP" as well. |
| Small clarification | andreyDagger | 1121. Филиалы | 13 ноя 2021 12:28 | 1 |
You don't need to sum the branches, you need to do binary OR "|" on them. |
| How to not write many "if-elif-...." | andreyDagger | 1302. Дельта-волна | 13 ноя 2021 10:42 | 1 |
On every step you move one level down. You have three choices to go down-left, down-right and just down (it's not always possible). So, you check which side m is on. If on the right, then we go down-right, otherwise - down-lef, if it's right below us, then we just go down |
| Some tips | irinaguseva | 1073. Квадратная страна | 13 ноя 2021 00:26 | 1 |
The most important idea for this task is the fact that according to Lagrange’s Four Square Theorem, every natural number can be written as the sum of squares of four non-negative integers. Good luck, hope this will help! Edited by author 13.11.2021 00:26 Edited by author 13.11.2021 00:26 |
| Another approach | andreyDagger | 1218. Episode N-th: The Jedi Tournament | 11 ноя 2021 22:35 | 1 |
I see many people solved this with graph algorithms, there is also greedy approach. Let's build graph: u->v, if jedi u is winning v. You are doing n iterations, on every iteration you check, can current Jedi win, or not. There is greedy strategy to check this. You can eliminating enemies in order of the number of incoming edges. The fewer edges lead to a Jedi, the earlier we should eliminate him Edited by author 11.11.2021 22:35 Edited by author 11.11.2021 22:35 Edited by author 11.11.2021 22:36 |
| 2 details not mentioned | itskiller | 1038. Проверка орфографии | 11 ноя 2021 17:58 | 2 |
there are 2 details which are not mentioned in the document. 1. number(0-9) is also the splitor of word, so word can only contained characters,a-z. such as A0B is 2 words. 2. Next line starts one new word, but not always starts one new sentence, such as this is one sentence, but is splited to 2 lines. |
| Why wrong Answer on TEst NumbEr 3??????? hel me please! | 6yxa/\bl | 1038. Проверка орфографии | 11 ноя 2021 17:48 | 2 |
|
| for WA#3 and WA#10 | tqti | 1038. Проверка орфографии | 10 ноя 2021 06:23 | 5 |
WA#3: new word start after '\n';(e.g. Abc'\n'new_word_here) WA#10 new word start after number; (e.g. 909090new_word_here) Thank you very much! It helps me a lot! I WA#3 because of this :D Thank you very much! It helps me a lot! I WA#3 because of this :D Thank you very much! It helps me a lot! I WA#3 because of this :D |
| AC in 5 rows | andreyDagger | 1053. Пиноккио | 8 ноя 2021 21:00 | 1 |
5 rows of code to solve this |
| A hint for those with WA15 | vnikulin | 1415. Мобильная жизнь | 8 ноя 2021 18:15 | 1 |
My issue was in EPS. When I changed it from 1e-5 to 1e-8 I got AC. Good luck! |
| To admins | andreyDagger | 1211. Круговая порука | 8 ноя 2021 18:05 | 2 |
I think this is very easy for 319 points of hardness, you only need to find cycle in directed graph Hardness is calculated automatically. Admins have nothing to do with it |
| help wa 25 / wa 6 | >>> | 1463. Радость населению! | 8 ноя 2021 16:59 | 1 |
|
| why time limit in 3rd? | Esteban Chandia | 1404. Легко взломать! | 8 ноя 2021 07:57 | 1 |
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ char encrypted[100],desencriptado; int largo, resta; scanf("%s",encrypted); largo=strlen(encrypted); for(int j=0;j<largo;j++){ encrypted[j]-= 97; } encrypted[0]+=26; for(int i=1;i<largo;i++){ while(encrypted[i]<encrypted[i-1]){ encrypted[i]+=26; } } resta=5; for(int n=0;n<largo;n++){ desencriptado=((encrypted[n]-resta)%26)+97; printf("%c", desencriptado); resta=encrypted[n]; } return 0; } |
| it is a tree!!! | >>> | 1371. Грузоперевозки | 8 ноя 2021 01:37 | 1 |
|
| WA8 need help | Harshita Sharma | 1742. Тим-билдинг | 7 ноя 2021 17:49 | 1 |
I keep getting WA8 but I don't have any test cases that may go wrong. Please help. |
| Small hint | andreyDagger | 1155. Дуоны | 5 ноя 2021 18:12 | 1 |
Notice, that you can move duons alongside diagonal (A->F, A->H, G->E, ...) |
| Happy Ending Problem | yyll | 1538. Сторожевые башни | 5 ноя 2021 13:44 | 1 |
|