| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| python 3.6 hint | Bergus | 1100. Таблица результатов | 30 май 2022 08:50 | 2 |
limit the number of conversions str->int |
| WA #13 | lijian | 1577. Электронная почта | 30 май 2022 04:00 | 2 |
WA #13 lijian 20 окт 2007 08:03 please give some test data!! Edited by author 20.10.2007 08:04 Mind mod, I had 10^7+7 and it was failing |
| rounding in python is easy | yyll | 1300. Налогообложение | 28 май 2022 13:02 | 1 |
You can just do calculations with floats as much as possible, e.g., 15% = 0.15, binary search with epsilon = 0.0001. Rounding with round(x, 2) are needed only when: 1. K*L 2. output of T(K) -- "The calculation of the regional coefficient and all kinds the taxes is made with rounding off to two digits after a decimal point." while K itself is float. |
| very short, but MLE/TLE python solution | yyll | 1863. Мирный атом | 28 май 2022 09:37 | 1 |
n, s, k = map(int, input().split()) a = 1 << s for u in map(int, input().split()): a = a >> u | (a & (1 << n+1-u) - 1) << u print((a & -a).bit_length() - 1, a.bit_length() - 1) |
| compiler problem | khodezatuk kobra | 1083. Факториалы!!! | 27 май 2022 20:45 | 1 |
#include<bits/stdc++.h> using namespace std; int solve(int n, string k){ int ans=k.size(); if(n>=1){ return n*solve(n-ans); } else{ return 1; } } int main() { int t,n; string k; cin>>n; cin>>k; int result=solve(n,k); cout<<result<<endl; return 0; } |
| Wrong answer Test 2 | DrDynamic | 1788. О пользе зонтов | 27 май 2022 18:08 | 1 |
|
| (Test № 4 here) | Iosif inf-10 | 1613. Для любителей статистики | 27 май 2022 08:41 | 6 |
This is Test 4 11 1 2 2 1 1 1 2 2 1 2 1 11 1 1 3 1 4 1 2 8 1 10 11 1 1 3 1 2 3 1 3 7 2 4 6 2 5 9 2 11 11 2 10 11 2 Answer is 01111010101 Edited by author 08.02.2013 04:06 |
| Damn, I cann't solve it! | Alexey | 1302. Дельта-волна | 26 май 2022 17:45 | 7 |
Please, tell me how to solve this problem... Not solution but an idea or a hint... Thanks. You just have to understand the optimal algorithm for finding a shortest way from A to B on this object. I'm trying... Should I write a Function(n) wich returns the number of row in wich n shands? There is three kinds of "rows", so, what shall I do? Give me the way to think... Find optimal path from 1 to some small numbers. It will help you. Try to change direction in the optimal path as few times as possible. It must be formula, isn't it? Or there is an algo to find answer? There is a formula, but it's a bit easier to solve using algo. Convert input numbers into row/column. Row will not exceed ~33000, so you can iterate over row using algo and use math over column. Sorry, could you tell me the algorithm, otherwise I don’t understand it ... |
| Stupid Eps | DarksideCoder | 1058. Шоколад | 26 май 2022 13:46 | 1 |
please give me some tests. |
| WA4 C# | Varun Sharma | 1457. Теплотрасса | 24 май 2022 15:38 | 1 |
WA4 C# Varun Sharma 24 май 2022 15:38 Those who are getting WA4 when using C#, please use the following format to print out the output. The type of variable sum is double and individual numbers read in the second line are also converted to double first before adding them together. Console.WriteLine("{0:F6}", sum / cases); |
| How to solve this problem? | whoiam | 1845. Целочисленный комплексный определитель | 23 май 2022 20:59 | 1 |
Hello women and men! I haven't been able to solve this problem for a long time. Please, help me that. |
| WA9 | severin | 1517. Свобода выбора | 23 май 2022 17:51 | 2 |
WA9 severin 1 июн 2012 20:53 Does anyone see what goes wrong with my program for the input of test #9? or test inputs maybe? EDIT: Test Case found! Edited by author 01.06.2012 22:08 Re: WA9 Tran Le Hoang Lam 23 май 2022 17:51 Can you tell me how to fix WA 9, plz |
| WA3 | andreyDagger | 1773. Метро в каждый дом | 22 май 2022 23:23 | 1 |
WA3 andreyDagger 22 май 2022 23:23 |
| Right answer for first sample | sergovoy | 1659. Правильные треугольники | 22 май 2022 18:34 | 2 |
0 30 -25.9807621135 -15 25.9807621135 -15 3.711537444785714 10.714285714285715 -11.134612334357143 -2.142857142857144 7.423074889571431 -8.571428571428571 18.557687223928568 23.57142857142857 -29.69229955828571 4.285714285714285 11.134612334357145 -27.857142857142854 As the matter of fact this problem can have multiple solutions: This one is also correct solution for the first sample test case -14.998661880355732 -4.018465371022687 4.019237844660736 14.998454896701402 10.979424035716015 -10.979989525657688 -29.99999996018567 0.00154508598054 15.001338063819592 25.979989536091384 14.99866189635838 -25.981534622043206 |
| Here is my, well commented, O(n^3) solution for reference | Abhishek Gupta | 1167. Bicolored Horses | 22 май 2022 10:19 | 1 |
deleted Edited by moderator 23.07.2022 20:36 |
| Почему в случае 1 10 ответ 9 если 0 тоже число в котором не идут два подряд ноля? | Stolyarov Artyom | 1009. K-ичные числа | 21 май 2022 13:17 | 5 |
Почему в случае 1 10 ответ 9 если 0 тоже число в котором не идут два подряд ноля? Просто 2 раза получил ВА, поменял на 9 и АС. N ≥ 2. Test "1 10" is incorrect; there is no such test in the test set. You are wrong. In case 1 10 you have exactly nine 1-digit numbers without two or more subsequent zeros. They are: 1,2,3,4,5,6,7,8 and 9. What do you mean? '0' is *also* a 1-digit number without two or more subsequent zeroes, no? Also, yay for necroposting! |
| Solution with probability | andreyDagger | 1507. Трудное решение | 18 май 2022 17:24 | 1 |
Calculate matrix with modulo 10^9 + 7 |
| Why WA on test case 7? please help | farid | 1207. Медиана на плоскости | 17 май 2022 23:27 | 2 |
#include <bits/stdc++.h> using namespace std;
int const N = 123456; #define pi acos(-1.0) typedef long long ll;
int ar[N],xar[N],uses[N];
struct points { double x, y; int id; points() {} points(double x, double y) : x(x), y(y) {} } ;
double ang(const points &p){ double res = atan2(p.y, p.x); if(res < 0) res += 2.0 * pi; return res; }
struct cmp{ inline bool operator () (const points &p1, const points &p2){ double ang1 = ang(p1)*(180/pi), ang2 = ang(p2)*(180/pi); if(fabs(ang1 - ang2) < 1e-9){ ll d1 = (ll)p1.x * (ll)p1.x + (ll)p1.y * (ll)p1.y; ll d2 = (ll)p2.x * (ll)p2.x + (ll)p2.y * (ll)p2.y;
return d1 < d2; } return ang1 < ang2; } };
points pt[N];
int main() { int n; cin >> n; for(int i = 0; i < n; i++){ cin >> pt[i].x >> pt[i].y; pt[i].id = i+1; } sort(pt, pt+n, cmp()); cout<<pt[0].id<<" "<<pt[(n/2)].id<<endl;
return 0; } I know this is an old post. but for others' reference, we should use long long to avoid integer overflow. |
| Good problem. | silverfox | 1987. Вложенные отрезки | 17 май 2022 11:31 | 1 |
Sort the intervals by length. and from i=0 to no_of_intervals, mark the query numbers. Make sure that each query number is marked by only one interval. Edited by author 17.05.2022 11:32 |
| I've WA#9 | † SiriuS † [TWYT Union] | 1202. Путешествие по прямоугольникам | 16 май 2022 02:01 | 3 |
I've WA#9 † SiriuS † [TWYT Union] 5 мар 2014 14:16 What's the test for WA#9? Try 3 0 0 10 10 10 0 20 10 20 0 30 10 Answer 36 try a rectangle in the negative area |