| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| What's wrong? Runtime error | gkd002 | 2066. Простое выражение | 24 мар 2025 21:05 | 2 |
a, b, c = map(int, input().split(" ")) a = int(a) b = int(b) c = int(c) lst = [a, b, c] lst.sort() d = lst[0]-lst[1]*lst[2] e = lst[0]-lst[1]-lst[2] if d<e: min = d else: min = e print(min) You have a 3-line input,but you entered everything in one line |
| WA 5 | ~'Yamca`~ | 1849. Охота на зайцев 2 | 24 мар 2025 00:35 | 1 |
WA 5 ~'Yamca`~ 24 мар 2025 00:35 this test may help you: 4 0 0 1 0 2 0 3 0 2 1 2 1 0 1 0 1 0 1 19 1 0 ans: 2 0 |
| WA 2 | ~'Yamca`~ | 1849. Охота на зайцев 2 | 24 мар 2025 00:33 | 1 |
WA 2 ~'Yamca`~ 24 мар 2025 00:33 "If there are several such propositions, output the one with the maximal number." |
| WA 52 | ~'Yamca`~ | 1717. Правила допуска | 23 мар 2025 21:15 | 1 |
WA 52 ~'Yamca`~ 23 мар 2025 21:15 1500 1 1 -1000000000 1 1 -1000000000 1 1 -1000000000 1 1 -1000000000 1 1 -1000000000 1 1 -1000000000 1 1 -1000000000 1 1 -1000000000 ..... ans: 1 1 1 1 |
| WA 22 | ~'Yamca`~ | 1455. Свобода слова | 21 мар 2025 23:01 | 1 |
WA 22 ~'Yamca`~ 21 мар 2025 23:01 4 ab ba aba bab answer: ababa |
| tests generator | LeTim | 1369. Тараканьи бега | 20 мар 2025 11:52 | 1 |
Here is a simple "bad" tests generator on C++ to test your solutions (through comparing answers with brutforce solution): const double PI = 3.14159265358979323846; mt19937 rnd; struct Point { double x, y; }; double dist(const Point& a, const Point& b) { return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)); } bool check(const vector<Point>& points, const Point& p) { for (const auto& p2 : points) if (dist(p, p2) < 1e-3) return 0; return 1; } pair<vector<Point>, vector<Point>> gen_bad_test(int m = 100000, int n = 10000, double R = 10000, double r = 10) { vector<Point> cockroaches, sweets; cockroaches.reserve(m); sweets.reserve(n); while (m--) { Point p; do { double a = uniform_real_distribution<double>(0, 2*PI)(rnd); p = {cos(a) * R, sin(a) * R}; } while (!check(cockroaches, p)); cockroaches.emplace_back(p); } while (n--) { Point p; do { double a = uniform_real_distribution<double>(0, 2*PI)(rnd); double d = sqrt(uniform_real_distribution<double>(0, 1)(rnd)) * r; p = {cos(a) * d, sin(a) * d}; } while (!check(cockroaches, p)); sweets.emplace_back(p); } return {cockroaches, sweets}; } This generator uniformly distributes points-cockroaches on a circle of radius R and points-sweets inside a circle of radius r. And another generator that just distributes all points within [-MAX; MAX] along both axes: pair<vector<Point>, vector<Point>> gen_rand_test(int m = 100000, int n = 10000, double MAX = 10000) { vector<Point> cockroaches, sweets; cockroaches.reserve(m); sweets.reserve(n); auto urd = uniform_real_distribution<double>(-MAX, MAX); while (m--) { Point p; do p.x = urd(rnd), p.y = urd(rnd); while (!check(cockroaches, p)); cockroaches.emplace_back(p); } while (n--) { Point p; do p.x = urd(rnd), p.y = urd(rnd); while (!check(sweets, p)); sweets.emplace_back(p); } return {cockroaches, sweets}; } I just got AC for this problem and these two generators greatly helped me debug the solution revealing bugs and precision issues |
| WA 3 | ~'Yamca`~ | 1951. Комплексный корень | 17 мар 2025 23:33 | 1 |
WA 3 ~'Yamca`~ 17 мар 2025 23:33 |
| WA 4 | tima20072007 | 1881. Длинное условие задачи | 16 мар 2025 23:00 | 2 |
WA 4 tima20072007 4 апр 2024 21:45 Не вздумайте решать задачу, оно того не стоит. Re: WA 4 Andre Marin C# 16 мар 2025 23:00 я именно за этим и пришел сюда |
| WA2 | andreyDagger`~ | 1882. Старенькая Nokia | 16 мар 2025 22:55 | 3 |
WA2 andreyDagger`~ 13 май 2023 15:27 Re: WA2 ~'Yamca`~ 16 мар 2025 18:56 Re: WA2 andreyDagger`~ 16 мар 2025 22:55 |
| WA 3 | ~'Yamca`~ | 1940. Непростые годы | 13 мар 2025 18:10 | 1 |
WA 3 ~'Yamca`~ 13 мар 2025 18:10 Don't forget to add primes <= k |
| cool problem, but overrated | ~'Yamca`~ | 2195. Бинарные деревья | 12 мар 2025 20:16 | 1 |
|
| PLEASE_Python Time limit exceeded | Alice | 1196. Экзамен по истории | 11 мар 2025 17:31 | 1 |
how can it be improved???? n = int(input()) sp = [] a = [] c = 0 for i in range(n): sp.append(int(input())) m = int(input()) for i in range(m): x = int(input()) if x in sp: c += 1 print(c) |
| if a = 0 and b = 0?? | gooooooogol | 1420. Целочисленное комплексное деление | 11 мар 2025 10:55 | 2 |
if a = 0 and b = 0 => r = 0 and q every complex number => count solation equation = infinity |
| easy and overrated problem | ~'Yamca`~ | 1311. Устойчивая конструкция | 11 мар 2025 00:59 | 1 |
|
| Is it possible to reset progress? | deleted #1 | | 10 мар 2025 02:05 | 2 |
I would like to know if I can reset my progress here. I want to start afresh, but as I don't see a way to delete accounts, I thought that, at least, resetting my progress would be enough, but I can't do that either! Thanks in advance for your help! Edited by author 14.02.2025 08:40 You can request deleting your account by writing an email to support |
| correct code | Vlad | 1639. Шоколад 2 | 8 мар 2025 12:26 | 3 |
int main(){ int x, y; cin >> x >> y; if ((x*y-1)%2==1) cout << "[:=[first]"; else cout << "[second]=:]"; return 0; } #include <iostream> using namespace std; int main () { int m,n; cin>>m>>n; if((m*n)%2==0)cout<<"[:=[first]"; else cout<<"[second]=:]"; return 0; } |
| WA19 | 👑TIMOFEY👑`~ | 1703. Рука робота | 5 мар 2025 16:43 | 1 |
WA19 👑TIMOFEY👑`~ 5 мар 2025 16:43 |
| WA 14 | ~'Yamca`~ | 1916. Руины титанов: в ожидании стабильности | 4 мар 2025 16:52 | 1 |
WA 14 ~'Yamca`~ 4 мар 2025 16:52 |
| hint? | sailingoat | 2179. Нужно больше трасс | 2 мар 2025 19:06 | 1 |
hint? sailingoat 2 мар 2025 19:06 can I have hint, at addflash@dmc.chat Please |
| Please ! Need help..my algoritm is wright, but ! WA9 | glisssss | 1296. Гиперпереход | 2 мар 2025 01:13 | 5 |
> > i found my mistake Edited by author 20.11.2005 00:44 I have wa#9 but I can't found mistake :( what is test 9? I tried this and I get the correct answer, but test 9 code fails. Here is the code that fails test 9: from typing import List potentials: List[int] = [] N: int = int(input()) for p in range(N): potentials.append(int(input())) def list_max_right_sum(lst: List[int]) -> List[int]: amount: int = 0 left_min: int = 0 left_max_index: int = 0 k: int = 0 for i, p in enumerate(lst): amount += p k = i + 1 if amount < left_min: left_min = amount left_max_index = i + 1 return lst[left_max_index: k] result: List[int] = list_max_right_sum(potentials) result.reverse() result = list_max_right_sum(result) print(sum(result)) |