Общий форум| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | | TL | andreyDagger | 1603. Эрудит | 20 сен 2021 15:25 | 1 | TL andreyDagger 20 сен 2021 15:25 If you use mask as two-dimensional array you probably will get TLE, instead of this use bitset from STL Edited by author 20.09.2021 15:25 | | Some tests for... :-) | Oleg Strekalovsky [Vologda SPU] | 1494. Монобильярд | 20 сен 2021 14:03 | 4 | 5 2 4 3 1 5 Not a proof 5 2 4 1 3 5 Cheater I thought he could only come in the end. Thanks :) Удалил сообщение, т.к. понял свою ошибку. Edited by author 20.09.2021 14:14 | | test for WA6 | vegetable | 1796. Парк аттракционов | 19 сен 2021 22:50 | 1 | | | DP | vegetable | 1044. Счастливые билеты. Easy! | 17 сен 2021 19:11 | 1 | DP vegetable 17 сен 2021 19:11 n/=2; dp[n][n*9]; dp[i][j] = dp[i-1][j]+dp[i-1][j-1] + ... + dp[i-1][j-9]; ans = dp[n][0]*dp[n][0] + ... + dp[n][n*9]*dp[n][n*9]; Edited by author 17.09.2021 19:12 Edited by author 17.09.2021 19:12 | | SPOILER. Hint | andreyDagger | 1125. Классики | 16 сен 2021 16:21 | 1 | Precalculate pythagorean tripples | | Weak tast | zwqzwq | 1128. Деление на группы | 15 сен 2021 19:08 | 1 | 9 3 9 8 2 3 7 3 1 2 4 2 2 5 3 3 7 6 4 3 9 8 5 2 5 2 2 6 1 2 6 1 Please try this data,please My progame can't pass this,but I got AC | | test 30 100 eng text "GOV Chronicles" = 4 | vegetable | 1881. Длинное условие задачи | 14 сен 2021 22:10 | 1 | | | What's wrong? test 3 WA | Alex | 1263. Выборы | 13 сен 2021 21:19 | 1 | My code: n,m = map(int, input().split()) dct = dict() for i in range(m): a = input() if a not in dct: dct[a] = 1 else: dct[a] += 1 for i in dct: print("{0:.2f}%".format((dct[i]/m)*100)) Where is mistake? Edited by author 13.09.2021 21:32 | | Difficulty is overrated | 👾_challenger128_[PermSU] | 1049. Отважные воздухоплаватели | 13 сен 2021 20:50 | 3 | Hint: you should only know fundamental theorem of arithmetic It's easy if you know that number of divisors is (n_1+1)*(n_2+1)*...*(n_k+1), where n_i is power of prime that is included in number decomposition | | Треугольное число | Senya0000 | 1209. 1, 10, 100, 1000... | 13 сен 2021 18:30 | 1 | | | Wrong constraint for test case #9 | cylau1996 | 1210. Добрые духи | 13 сен 2021 01:45 | 2 | The question stated that 0 < N < 30. However, in test case #9 N is exactly 30, contradicting the constraint. The test has been fixed. The solutions have been rejudged, making some solutions submitted before adding this test rejected and some submitted after adding it accepted. | | Музыкальный портал хочу найти нормальный! | Aeon | | 12 сен 2021 10:03 | 4 | Посоветуйте пожалуйста сайты, где есть хорошая музыка в формате мп3 (не только русская), но также и зарубежная. Никто не знает? Edited by author 11.09.2021 19:41 На ютубе есть много шикарных подборок, которые тебя приятно удивят своим многообразием! Edited by author 12.09.2021 00:20 Представляю Вашему вниманию музыкальный ресурс от сайта http://mp3uk.net где можно бесплатно скачать новую музыку в mp3 формате или слушать онлайн! Скачивайте музыку прямо с сайта со своего мобильного телефона, планшета или компьютера. Сайт работает круглосуточно! | | Too strange! | zwqzwq | 1043. Закрыть дугу | 12 сен 2021 00:18 | 3 | First I got WA#22 while I used double than I change to use longdouble instead of double and I got WA#24 After that I change floor(x)/ceil(x) to floor(x+esp)/ceil(x-esp) and I got WA#24 too But when I try to use double again I got AC! [It's strange,too strange.I hate Accuracy issues] (Sorry for my poor English XP) Edited by author 07.09.2021 16:36 | | If you got WA5 | zwqzwq | 1093. Дартс | 11 сен 2021 07:00 | 1 | I guess that case is sth like a==0(a=-5Nz) ,b!=0 (b= VxNx+VyNy+VzNz) (I find a check t=c/b instead of t=-b/c by mistake,and got wa) | | java AC code snippet | esbybb | 1015. Найдите различия! | 8 сен 2021 18:08 | 2 | there are 24 unique sequences of edges for the specific cube, i use 12 sequences and flip flop front with back for each of them static int R[][] = new int[][] { {1,2,3, 4,5, 6}, {5,3,1, 4,2, 6}, {2,1,5, 4,3, 6}, {3,5,2, 4,1, 6},
{6,4,3, 1,5, 2}, {5,3,6, 1,4, 2}, {4,6,5, 1,3, 2}, {3,5,4, 1,6, 2}, {1,2,6, 3,4, 5}, {6,4,2, 3,1, 5}, {2,1,4, 3,6, 5}, {4,6,1, 3,2, 5} }; static int front_back_rotate[][] = new int[][]{{0,1,2,3,4,5},{0,1,4,5,2,3}}; //left right top front bottom back //0 1 2 3 4 5 static boolean eqv(int a[], int b[]) { for (int[] r: R) { for (int[] I: front_back_rotate) { int front_back[] = new int[6]; for (int i=0; i<6; i++) { front_back[r[I[i]]-1] = a[i]; } if (Arrays.equals(front_back, b)) return true; } } return false; }
You don't need to try all rotation combinations. Just rotate left and rotate down, use recursion and all combinations will be generated easily. | | Very interesting, what contour employee has a salary with 2001 digits? | D4nick | 1123. Зарплата | 8 сен 2021 15:23 | 3 | If you are from Russia, this should be clear) That should be very good programmers :) Edited by author 08.09.2021 15:24 Edited by author 08.09.2021 15:24 | | Test 66? | Shohruh | 1808. Чапаев на планете Океан | 3 сен 2021 18:43 | 1 | | | If WA9 | zwqzwq | 2104. Игра с полоской | 3 сен 2021 17:26 | 1 | If WA9 zwqzwq 3 сен 2021 17:26 Take attention: No matter whose turn it is,if all the color is A,than Alise win,else Bob win. | | Dose this problem have a way to find the answer intime? | zwqzwq | 1622. Endspiel | 3 сен 2021 16:00 | 1 | Just like the title,I know how to solve this problem,becouse I have played the game before,and I know there is a way to move the chess.But if somebody dosen't play the game at all before,than how can he solve the problem?(Sorry for my poor English) Edited by author 03.09.2021 16:00 | | WA10, help me please) | Roman Hrynevych | 1131. Копирование | 1 сен 2021 15:18 | 2 | #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int main() { int n, k; scanf("%d %d", &n, &k); if (n < 1 || n > pow(10, 9) || k < 1 || k > pow(10, 9)) { return 0; } unsigned long long result = 0; unsigned long long buffer = 1; n--; for (int i = 0; n >= 0; i++) { n -= buffer; result++; buffer *= 2; if (n <= 0) { printf("%llu\n", result); return 0; } if (buffer >= k) { buffer = k; double count = (double)n / buffer; if (count != (long long)count) { count++; } result += count; printf("%llu\n", result); return 0; } } return 0; } Edited by author 21.01.2020 01:57 |
|
|