| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Hint for WA 2 and 5, that helped me | Hououin`~`Kyouma | 1844. Лидер армии магов | 11 авг 2025 12:41 | 1 |
"You have to determine whether such a stupid DEFEAT is possible." NOT a victory, but a DEFEAT. Edited by author 11.08.2025 12:41 |
| WA 6 | ~'Yamca`~ | 1655. Сомалийские пираты | 10 авг 2025 14:12 | 1 |
WA 6 ~'Yamca`~ 10 авг 2025 14:12 Problem with accuracy, you should print exactly 3 digit after dot |
| hint/spoiler | ~'Yamca`~ | 2196. Апокалипсис | 9 авг 2025 05:21 | 1 |
You can use sqrt-decomposition to find nearest point. It much easier than tangent, but slowly |
| a little hint | ~'Yamca`~ | 1558. Periodical Numbers | 8 авг 2025 11:53 | 1 |
period + preperiod always < 100, so you can use bruteforce:) |
| Help.Need in tests | Felix_Mate | 1387. Папа у Васи | 8 авг 2025 11:26 | 2 |
WA21; My tests: N=9 =>286 N=13 =>12486 N=20 =>12826228 N=25 =>1142161275355632 N=33 =>13654755591665021157 N=25 => 2067174645 N=33 => 7929819784355 |
| This test helped me | 0bla4ko`~ | 1202. Путешествие по прямоугольникам | 7 авг 2025 20:22 | 1 |
3 0 0 6 8 6 -3 11 6 11 -3 21 0 Answer 21 |
| WA Test 28 | Maxim Popkov | 1884. Путь к универу | 7 авг 2025 04:30 | 1 |
Please, help!!! Tell me the test 28! |
| WA 2 | ~'Yamca`~ | 1323. Одноклассники | 5 авг 2025 08:50 | 1 |
WA 2 ~'Yamca`~ 5 авг 2025 08:50 if you use dp + bimatching your matching algo is wrong |
| Beautiful accepted | Axmed | 1385. Интересное число | 4 авг 2025 16:26 | 1 |
We have number n = a * (10 ^ n) + b. n mod a = 0 and n mod b = 0 If n mod a = 0 that b mod a = 0. If n mod b = 0 that a * (10 ^ n) mod b = 0 We have now b mod a = 0 a * (10 ^ n) mod b = 0 Ok, now let's imagine b = k * a. First condition is fulfilled. a * (10 ^ n) / (k * a) = 10 ^ n / k K is divider of 10 ^ n. Let's note that k is less then 10. Why? Because a * 10 have n + 1 digit but b must have n digit. Now for all 1 <= k <= 9 and 10^n mod k = 0 we calculate how many good numbers a we can use, a * k must have n digit that 10 ^ (n - 1) <= a <= (10 ^ n - 1) // k. Sum of all good ways to choose a and k is answer! |
| If you don't understand how the figures produces | andreyDagger`~ | 1442. Дымолётный порошок | 4 авг 2025 15:33 | 1 |
Let l="line which connects top corner of cone and one of the points on the corner of base" Also a="angle between 'l' and surface" A line is drawn on the surface with distance d to the center of cone. Then two 2d planes are drawn through this line. The angle between plane and surface is equal to 'a'. These planes are directed in the opposite angles. Set of points that are in the cone and between these 2d planes will fall in the slit |
| Easy Accepted | Axmed | 1204. Идемпотенты | 4 авг 2025 13:11 | 1 |
At first N = p * q, let's find this prime numbers p and q. Now we have x * x = x mod N. x * x - x = 0 mod N x * (x - 1) = 0 mod N Let's note that x != pq, because x < n. That means x mod p = 0, x - 1 mod q = 0 or x mod q = 0, x - 1 mod p = 0. Consider { x mod p = 0 x mod q = 1 } another case is symmetrical. x = k * p, because x mod p = 0. Now we have k * p mod q = 1 k = 1 / p mod q k = p ^ (-1) mod q Use Fermat's little theorem k = p ^ (q - 2) mod q. We find x = k * p, problem is solved. |
| WA 4 | andreyDagger`~ | 1661. Додекаэдр | 4 авг 2025 12:08 | 1 |
WA 4 andreyDagger`~ 4 авг 2025 12:08 Rotations with cycles of length 2 actually have two fixed points |
| Whats 28 WA | grmmmely | 1014. Произведение цифр | 3 авг 2025 20:52 | 1 |
|
| wa12 | 👑TIMOFEY👑`~ | 1074. Очень короткая задача | 1 авг 2025 16:32 | 1 |
wa12 👑TIMOFEY👑`~ 1 авг 2025 16:32 maybe -0 0 -0 1 answer should be without -, i changed that and got ac |
| How come there are solutions that are 0.015 sec and less than 0.1 sec | Sergey | 2130. Алиса + Боб | 31 июл 2025 19:45 | 4 |
my solution is the following: start with least common multiple = 1 make char array of 1000 000 to track forbidden divisors let div be the divisor and ans the answer if ans == 1 make new lcm of the previous lcm and current divisor. if it is over 10^12 - fail. find all the divisors of div, check that they are not forbidden in the forbidden array if ans == 0 - check if lcm is divisible by the divisor and fail if it is.
complexitiy O(n * sqrt(1000000)) (sqrt from the "find all divisors) my solution gets 0.5 sec (using cin,cout with tie(null)) what is the solution that gets less than 0.1 sec? Is there any hint? no need to find all divisors. u can just use lcm and mod operations. i can send you easy solution if u r still interested need to pray to god for quick solutions #pragma GCC optimize("Ofast") #pragma GCC optimize(O3) #pragma comment(linker, "/stack:200000000") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,tune=native") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("profile-values,profile-reorder-functions,tracer") #pragma GCC optimize("vpt") #pragma GCC optimize("rename-registers") #pragma GCC optimize("move-loop-invariants") #pragma GCC optimize("unswitch-loops") #pragma GCC optimize("function-sections") #pragma GCC optimize("data-sections") #pragma GCC optimize("branch-target-load-optimize") #pragma GCC optimize("branch-target-load-optimize2") #pragma GCC optimize("btr-bb-exclusive") #pragma GCC optimize("inline") #pragma GCC optimize("-fgcse") #pragma GCC optimize("-fgcse-lm") #pragma GCC optimize("-fipa-sra") #pragma GCC optimize("-ftree-pre") #pragma GCC optimize("-ftree-vrp") #pragma GCC optimize("-fpeephole2") #pragma GCC optimize("-ffast-math") #pragma GCC optimize("-fsched-spec") #pragma GCC optimize("-falign-jumps") #pragma GCC optimize("-falign-loops") #pragma GCC optimize("-falign-labels") #pragma GCC optimize("-fdevirtualize") #pragma GCC optimize("-fcaller-saves") #pragma GCC optimize("-fcrossjumping") #pragma GCC optimize("-fthread-jumps") #pragma GCC optimize("-freorder-blocks") #pragma GCC optimize("-fschedule-insns") #pragma GCC optimize("inline-functions") #pragma GCC optimize("-ftree-tail-merge") #pragma GCC optimize("-fschedule-insns2") #pragma GCC optimize("-fstrict-aliasing") #pragma GCC optimize("-falign-functions") #pragma GCC optimize("-fcse-follow-jumps") #pragma GCC optimize("-fsched-interblock") #pragma GCC optimize("-fpartial-inlining") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("-freorder-functions") #pragma GCC optimize("-findirect-inlining") #pragma GCC optimize("-fhoist-adjacent-loads") #pragma GCC optimize("-frerun-cse-after-loop") #pragma GCC optimize("inline-small-functions") #pragma GCC optimize("-finline-small-functions") #pragma GCC optimize("-ftree-switch-conversion") #pragma GCC optimize("-foptimize-sibling-calls") #pragma GCC optimize("-fexpensive-optimizations") #pragma GCC optimize("inline-functions-called-once") #pragma GCC optimize("-fdelete-null-pointer-checks") |
| suffix automaton | datym | 1769. Старая уральская легенда | 30 июл 2025 20:33 | 1 |
|
| JUDGES!!! SEE HERE!!!! | DonNTU Team (Akulshin, Belikov, Trofimenko) | 1303. Минимальное покрытие | 30 июл 2025 01:17 | 3 |
Hello to all. I've (Trofimenko:)) solved this problem. In my program I used constant MAXM=5000. I've got WA5. When I changed MAXM to 6000 I've got WA too. But when I changed maxm to 60000 I've got AC. It's so stupid... The set contains at least one and at most 99999 segments! What's means of your MAXM??? The number of segments? If yes,you are wrong without doubt! No, I was using it to limit M which should be <=5000 |
| Hint | __Andrewy__ | 2174. Дуализм чисел | 29 июл 2025 22:32 | 1 |
Hint __Andrewy__ 29 июл 2025 22:32 Hint 1: The original graph is not bipartite. However, you may notice that even numbers are included in one set, and odd numbers > 1 are included in another. Separately, you need to understand what to do with 1. Hint 2: Kuhn's Algorithm for Maximum Bipartite Matching for bipartite graph (even numbers, odd numbers > 1 and ones) Some tests: 10 2 4 6 8 5 7 1 1 9 2 -> YES 2 5 4 7 8 9 6 1 2 1 6 2 4 6 8 1 5 -> NO 12 1 1 1 1 1 2 3 4 5 6 7 8 -> YES 8 3 2 5 6 7 4 1 1 1 1 1 Edited by author 29.07.2025 22:35 |
| my AC solution is very simple | sahand | 1047. Простые вычисления | 29 июл 2025 15:29 | 2 |
Hello guys in this problem we have n equation with n unknown than solved with Gause-Jordan modification a0 a1 a2 a3 a4 a5 .... an if a1=(a0+a2)/2 - c0 then 2a1 - a2 = a0- 2c0 if a2=(a1+a3)/2 - c1 then -a1 +2a2 - a3= -2c1 .... 2a1 - a2 = a0- 2c1 -a1 +2a2 - a3= -2c2 -a2 +2a3 - a4= -2c3 -a3 +2a4 - a5= -2c4 .... -an +2an-1 - an+1 = -2cn e.g for n=5: 2 -1 0 0 0 a0-2c1 -1 2 -1 0 0 -2c2 0 -1 2 -1 0 -2c3 0 0 -1 2 -1 -2c4 0 0 0 -1 2 a6-2c5 and now you must solve the top diagonal "-1" of matirs ( start of last row)and finish. the order is O(n) sudo code is: m[0 ... n] a=2; while(--n){ f= 1/a; m[n-1]= m[n-1]+ f*m[n]; a = 2-f; } cout<< m[0]/a ;
Edited by author 01.03.2008 22:56 I did the same stuff in my solution, but I used Cramer's rule to calculate the answer. I used recurrent sequence for calculating determinants. Final complexity is O(n), but the it is easily can be calculated in O(logn). |
| I thought it would be more difficult. | Спажев Артемий Сергеевич | 1496. Спамер | 29 июл 2025 15:10 | 1 |
n = int(input()) b = [] c = [] for i in range(n): a = input() if a in b: if a in c: a = " no matter" else: c.append(a) else: b.append(a) d = len(c) for s in range(d): print(c[s]) |