| Show all threads Hide all threads Show all messages Hide all messages |
| f**k negative delta | masonpop | 1707. Hypnotoad's Secret | 1 Jan 2025 18:08 | 1 |
|
| Почему 1 тест 3? | KillerQueen | 1005. Stone Pile | 30 Dec 2024 14:18 | 2 |
1) кучи должны быть одинаковыми? 2) если нет то почему нельзя взять самое маленькое число и вычесть из него остальные? 1 тест 13+14+8-27-5=3 или 27+8-13+14+5=3 |
| :-) | Dmi3Molodov | 1792. Hamming Code | 30 Dec 2024 03:51 | 1 |
:-) Dmi3Molodov 30 Dec 2024 03:51 |
| WA10 | andreyDagger`~ | 1166. Funny Card Game | 29 Dec 2024 23:57 | 1 |
WA10 andreyDagger`~ 29 Dec 2024 23:57 Only KS can be skipped but not KD KC KH |
| if you have WA5 and logically correct solution | Just random | 1796. Amusement Park | 29 Dec 2024 14:50 | 1 |
if you have a WA5, it is possible that you also did not read the condition, and instead of a 5000 bill you wrote something else (for example, 2000). Edited by author 29.12.2024 14:51 |
| About Noise() | andreyDagger`~ | 1704. Demodulation | 27 Dec 2024 03:35 | 1 |
Looks like Noise function acts like in real world. It is some random variable from normal distribution with zero expected value, and some small variation Edited by author 27.12.2024 03:35 |
| The number + its inverted number <= S | Sergio86 | | 26 Dec 2024 09:31 | 1 |
For a positive integer x, we define R(x) as a number equal to the inverted x in decimal notation. For example, R(123) = 321, R(1) = 1, and R(100500) = 5001. For a given number S, calculate the number of integers x such that 1 ≤ x and x+R(x) ≤ S. As an answer, print the remainder of dividing this number by 10^9 + 7. Input data contains an integer S written without leading zeros (0 < S < 10^100000). Test: 1000000 Answer: 505449 The idea: the dynamics of the digits of the number? What other ideas can you suggest? |
| Why TL5 on C++? | Mary | 1934. Black Spot | 25 Dec 2024 19:14 | 1 |
Im using BFS to find shortest way from S to F, BFS to count dists, BFS to count probability on shortest ways. I tried c++ vectors and arrays, both are getting TLe Maybe cause is long double values (three BFS can pass in 1 second). How can I fix it? Maybe Dijkstra on two parameters? |
| I can't choose!!! | Dmi3Molodov | 1290. Sabotage | 22 Dec 2024 02:52 | 1 |
O(N*logN) or O(N+max(P))? |
| Don't spend time on this problem | Igor Parfenov | 2110. Remove or Maximize | 20 Dec 2024 21:51 | 2 |
It seems, the only solution to this problem is recursion with correct "guess" on how to implement it to avoid TL. |
| Hint without doubles + Python | edfearay11 | 1133. Fibonacci Sequence | 20 Dec 2024 07:04 | 1 |
Consider the fact that for any sequence $G$ with the form of fibonacci, that is: $G_{i+1} = G_i + G_{i-1}$, then $G_i = G_1 \cdot F_i + G_0 \cdot F_{i-1]$. So the problem became to solve two linear equations in integers. Prove it with induction or consider the matrix exponentiation for fibonacci. You should use Python to avoid overflow (long long isn't sufficient, at least for my implementation). Good Luck! |
| About this problem | andreyDagger | 1517. Freedom of Choice | 20 Dec 2024 00:02 | 2 |
|
| WA4 | ixiolirion | 1662. Goat in the Garden 6 | 15 Dec 2024 13:06 | 1 |
WA4 ixiolirion 15 Dec 2024 13:06 "The vertices are listed in the order of traversal" means either in a clockwise or counterclockwise direction. |
| why i got Crash (ACCESS_VIOLATION)??????????????????Can you help me? | arthur | 1077. Travelling Tours | 12 Dec 2024 20:06 | 3 |
CODE IS HERE; #include "stdio.h" #include "string.h" long a[401][401]; long n,h,t; long i,j,m; int c[500]; int p[500]; long count=0; void bfs(int i) { int k; for(k=1;k<=n;k++) { if(c[k]==0) { if(a[i][k]==1) { a[i][k]=0; a[k][i]=0; c[k]=1; p[k]=i; bfs(k); } } } } void path(int a1,int a2) { int q[500]; int i=0; while(1) { q[i]=a2; i++; a2=p[a2]; if(a2==a1) break; } printf("%d",i+1); printf(" %d",a1); while(i>0) { printf(" %d",q[i-1]); i--; } printf("\n");
}
void main() { for(i=0;i<401;i++) for(j=0;j<401;j++) a[i][j]=0; scanf("%ld %ld",&n,&m); for(i=0;i<m;i++) { scanf("%ld %ld",&h,&t); a[h][t]=1; a[t][h]=1; } for(i=1;i<=n;i++) c[i]=0;
c[1]=1; bfs(1);
for(i=1;i<n;i++) { for(j=i+1;j<=n;j++) if(a[i][j]==1) { count++; } } printf("%ld\n",count); for(i=1;i<n;i++) { for(j=i+1;j<=n;j++) if(a[i][j]==1) { path(i,j); } }
} I have same problem and increased answer's array. got AC Try this 7 8 1 2 2 6 1 6 4 6 4 3 3 5 5 6 3 7 |
| WA#10 | Artem Khizha [DNU] | 1486. Equal Squares | 11 Dec 2024 16:38 | 5 |
WA#10 Artem Khizha [DNU] 26 Jan 2011 03:53 At the moment my way is to look through all the squares of length LEN (using binary search) and to check, whether a hash of a square was met before. It is of O(N*M*log(min{N, M})) complexity. But I get WA#10 again and again. Please, if someone had a problem with this test, share your impressions, 'cause I'm going slightly mad. You have a collisions with hash. (I've got this problem also because second number x was to small and close to first one). Re: WA#10 Artem Khizha [DNU] 5 Jul 2012 16:29 Thank you, it really had to do with collisions. Actually, my self-made hashset implementation was fantastically awful. :-) Edited by author 06.07.2012 15:48 Why you have used binary search? How we can say that the sq. matrix 2x2 has less value than 3x3. and 3x3 has less than 4x4. how can we justify? We run a binary search on the length of the square's side. For a fixed length of the square's side, we calculate the hash of all squares with that side length, and look for a pair of squares with the same hash. |
| wa on 3 | Roman | 2133. Terms of reference | 8 Dec 2024 23:10 | 2 |
got WA on 3, why, have any tests? Edited by author 14.03.2024 17:39 Try this: 7 3 6 5 2 6 1 4 4 2 1 1 6 4 1 4 10 2 1 Answer: 1 1 |
| easy max flow | ~'Yamca`~ | 2089. Experienced coach | 8 Dec 2024 14:52 | 2 |
Overkill, just dfs is enough) |
| Nice prob | daftcoder [Yaroslavl SU] | 1873. GOV Chronicles | 6 Dec 2024 01:49 | 2 |
Nice prob daftcoder [Yaroslavl SU] 22 Oct 2011 16:01 5 plus 1 plus 1 plus 1 plus 1 plus 1 plus 3 plus 1 plus 1 plus 1 plus 1 plus 1 plus 1 is ... 19!!!!! NINETEEN!!!1111!! FFFFUUUUU~~~~~ Okay, have to read prob statement again. :D You could have used brute force ;) |
| Please clarify. | Dmi3Molodov | 1080. Map Coloring | 30 Nov 2024 21:32 | 1 |
Прошу уточнить. В задании (и тестах) идёт речь о: 1) конечных географических 2D картах. 2) географических картах на сфере. 3) любых абстрактных картах в многомерном \ многосвязном пространстве. 4) другое. Please clarify. The task (and tests) are about: 1) Finite 2D geographical maps. 2) geographical maps on the sphere. 3) favorite abstract maps in a multi-dimensional \ multi-connected space. 4) other. |
| Strange rating/summary results | Oleg Vasilenko (Chelyabinsk) | | 30 Nov 2024 15:12 | 4 |
Admins, please look at this issue. I suppose it is mistake (or bug in rating system), that I became 1st place in rating solved same number of tasks as ACRush, but did it only in 2024 year, i.e. later. Suppose that rating must be the same and my place is 2nd. Looks like integer overflow :)) When I resubmitted one single AC solution (for 1394 task) - rating summary has changed again and now I got about 200 points of rating less than 1st place. Edited by author 18.11.2024 22:09 Congrats on solving all the problems! |