| Show all threads Hide all threads Show all messages Hide all messages |
| Good test | Skeef79 | 1208. Legendary Teams Contest | 10 Aug 2019 22:27 | 1 |
IF you have TL, try this test: 18 aasda0sd basdasdasd casdasd asdasd33a 0b12asdasd ca45sdasd cdasdas3das dasd0asda2ds e1dasqew sdsdad4asdsaf dasda0sdasd 0gasdasd asdasda5sa asdasdasd3b asda0sdasdc aqwewq6e bqweqwe cqweq0we cqweqw7e dqweqwe eqw3ewqees fsadasd8asd dasdasdas0d gasdasd asdasds9adasa abasdas3dads casdasd12 qweqwew123qea bqweqw3ewqe cweqqwee csadas12d dasdas0d ed0dsdadsa fdasdasd33 dasdasds30ad gasasdsad adasdasd123d badas3ddasda cdasds0adas asdads455as basdasda2sd casdasdd0sa cqwewq123e deeqw12e eqw1easda8d fasd123asd dasdasds3a1dqw gqwe9wqewes jeqweqw123e eqweq123wewee hwewe9wqq ldszczx123c ad123sdasdaq qweweq09f ans: 18 Edited by author 10.08.2019 22:28 Edited by author 10.08.2019 22:28 Edited by author 10.08.2019 22:28 |
| AC in 0.001 | Abid29 | 1348. Goat in the Garden 2 | 9 Aug 2019 23:41 | 1 |
#include<bits/stdc++.h> using namespace std; int main() { double a,b,c,d,m,n,l,p,t,s,k; cin>>a>>b>>c>>d>>m>>n>>l; p=sqrt((a-m)*(a-m)+(b-n)*(b-n)); t=sqrt((c-m)*(c-m)+(d-n)*(d-n)); s=max(p,t); if(s>l){s-=l; } else{ s=0;} k=min(p,t); if(k<=l){ k=0; } else if(p==t){ a=(a+c)/2,b=(b+d)/2; k=sqrt((a-m)*(a-m)+(b-n)*(b-n)); if(k<=l){ k=0; } else{ k-=l; } } else{ while(abs(p-t)>.001){ if(p<t){ c=(a+c)/2,d=(b+d)/2; t=sqrt((c-m)*(c-m)+(d-n)*(d-n)); } else{ a=(a+c)/2,b=(b+d)/2; p=sqrt((a-m)*(a-m)+(b-n)*(b-n)); } } k=min(p,t); if(k<=l){ k=0; } else{ k-=l; } } cout<<fixed<<setprecision(2)<<k<<endl; cout<<fixed<<setprecision(2)<<s<<endl; } |
| Invalid test | aid | 1473. Farm 2 | 8 Aug 2019 23:41 | 2 |
There seems to be some junk at the end of test 27. My solution with "while (read()) solve();" got WA but when I removed it I got OK. Test was fixed. Thank you! |
| Literature in Russian | __Andrewy__ | 1113. Jeep | 7 Aug 2019 19:27 | 1 |
Методы Программирования и Прикладные Алгоритмы |
| TL13 | __Andrewy__ | 2135. Pauline and commits | 7 Aug 2019 13:54 | 3 |
TL13 __Andrewy__ 5 Aug 2019 16:21 My solution is O(n) (<=60 * n iterations) but I have TL on python Help me to read fast data input My input code: n, l, r = map(int, input().split()) tokens = sys.stdin.read().split() a = list(map(int, tokens)) Re: TL13 [ITMO] Semyon Stepanov 6 Aug 2019 19:45 Thx But I solved problem using C++. The same algo but new implementation (added if ((prod / (double)1000000000) * a[j-1]> 1000000000) j = 0; else prod *= a[j-1];) Edited by author 07.08.2019 13:55 |
| AC~~~happy~~ | zxy_snow | 1120. Sum of Sequential Numbers | 7 Aug 2019 04:27 | 3 |
I used some methods, got TLE || WA ...T T ... You can enumerate P . Think carefully and you will get a O(sqrt(n)) solution. Spend some time for enum, cause i don't wanna to calculate in float variables. So fun!) |
| WA test 5 please help me c++ | Adol | 1243. Divorce of the Seven Dwarfs | 6 Aug 2019 22:37 | 1 |
#include<bits/stdc++.h> using namespace std; int main(){ unsigned long long int n; try{ cin >> n; cout << n%7 << endl; }catch(exception e){ cout << 1 << endl; } return 0; } |
| Don't panic! | Otrebus | 1158. Censored! | 6 Aug 2019 12:47 | 2 |
Some have claimed that this is a very difficult problem. Not true! There is a reasonably simple and very fast DP-solution to this problem. No string algorithms are required beyond the naive ones that every non-programmer knows. Hint: Store the solution for sentences of length k in A[k], and store the number of strings that end with some forbidden word i (0 < i < P), but does not contain any other forbidden words as substrings in F[i][k]. Then construct the solution from A[k] to A[k+1], updating F[i][k+1] as well for each i. For each new character that you tuck onto the end of a valid string of length k, you get A[k] more valid strings, except those that end with a forbidden word, so those strings need to be removed. But make sure you don't remove stuff that you've assumed that you already removed earlier in the string - that's where F[i][k] comes in handy. |
| Very Very Very Simple | Locomotive | 1194. Handshakes | 6 Aug 2019 04:13 | 5 |
every body handshakes all else his couple so n*(n-1) div 2 - k (couples doesnt handshake eachother)! --> Var n,k:integer; begin readln(n,k); writeln(((n*(n-1)) div 2) -k); end. Aidin_n7 What is The Autor Thinking? What's the meaning of the spliting group numbers? It just piss me off. Yep, this is the one way for solution. I've met problem like that earlier. Statements consist kinda "you need to get very-very much operation with binary code of number", but after some tests we understood, that solution was kinda "ans = n*(-1)". And it's good to have a short cut in problems for clever men;) |
| Accepted | Alexei | 1110. Power | 5 Aug 2019 22:46 | 1 |
This is my solution O(M log N) #include <bits/stdc++.h> #define in(x) freopen(x,"r",stdin) #define out(x) freopen(x,"w",stdout) #define N 100500 #define oo ll(1e16) #define P pair < int, int > #define PP pair < pair < int, int >, int > #define F first #define S second #define pb push_back #define el endl #define base ll(1e9 + 7) using namespace std; typedef long long ll; typedef long double ld; int n, m, y; bool o; int bin(int x, int st) { int res = 1; for(; st > 0;) { if (st & 1) res = (res * x) % m; x = (x * x) % m; st >>= 1; } return res; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m >> y; o = 0; for (int i = 1; i < m; i++) { int cur = bin(i, n); if (cur == y) cout << i << ' ', o = 1; } if (!o) cout << -1; } |
| WA#15 Can I have sample test please? | Jumabek Alikhanov | 1123. Salary | 5 Aug 2019 19:28 | 3 |
Test: 123131 Answer: 123321 Thanks! Didn't make numbers equal to zero in encreasing numbers after the right one of comparing; |
| Simple and fast solution in O(n) | Tunez(ITMO) | 1883. Ent's Birthday | 5 Aug 2019 17:57 | 1 |
Use scanline y = -x + a We need to use no more than 6 points If you want to be fast use k-statistic in O(n) For better explanation write here: myironmistake@gmail.com Edited by author 06.08.2019 18:42 |
| Not that difficult | Stuxnet | 2135. Pauline and commits | 5 Aug 2019 13:51 | 1 |
Even though it took me almost 2 hours to solve I'm surprised this has difficulty of 1539. It doesn't require any special knowledge and almost anyone can solve this. Solution is pretty straightforward. |
| WA in teste case 12 | Auro Soares | 1471. Distance in the Tree | 5 Aug 2019 07:32 | 1 |
Anyone can give me this test case? |
| DELETED | Gilles Deleuze | 2125. Continue the Sequence | 4 Aug 2019 15:15 | 1 |
DELETED Gilles Deleuze 4 Aug 2019 15:15 DELETED Edited by author 04.08.2019 22:55 |
| I didn't know meaning of parting! | lnxdx | 1194. Handshakes | 3 Aug 2019 00:03 | 1 |
|
| week Test! | Arthas | 1466. Magic Square | 2 Aug 2019 18:43 | 3 |
Dear admin: Please add this test: 3 2 4 6 2 1 7 8 I got tle on this test.But fortunately I got AC! My AC solution outputs "YES" on that test case. |
| Weak tests | Yermak | 1466. Magic Square | 2 Aug 2019 18:41 | 2 |
My two AC submissions give different answers on this test: 3 4 0 0 0 0 6 1 5 5 2 8 5 3 P.S. The first test case isn't the sample. Edited by author 19.11.2013 01:26 My AC solution outputs "NO" on that test case. |
| Hint for wa6,7,8 | tiancaihb | 1104. Don’t Ask Woman about Her Age | 2 Aug 2019 17:26 | 6 |
I WAed many many times, and finally got AC. Test6 is 0, whose answer is 2. Test 7 is probably 1 or 2, which my previous program had given incorrect answer to. The answer to Test 8 has to be 36, because I used "for(i=x;i<36;i++)" and wa8. (I also saw some prog posted on this forum had the same problem) When I found this and changed into "<=", AC at last. Sorry for my poor English. Hope these can help you guys somehow. Good luck! Thank to your help. Sorry for my poor English,too. Thank you, your hints helped me to get AC. I got Crash (integer division by zero) before. unfortunately, it didn't help me :( still get WA8, any ideas?? I WAed many many times, and finally got AC. Test6 is 0, whose answer is 2. Test 7 is probably 1 or 2, which my previous program had given incorrect answer to. The answer to Test 8 has to be 36, because I used "for(i=x;i<36;i++)" and wa8. (I also saw some prog posted on this forum had the same problem) When I found this and changed into "<=", AC at last. Sorry for my poor English. Hope these can help you guys somehow. Good luck! Thanks... Thanks, my program went in cycle to 35 instead of 36) |
| BUBBLE_SORT? | artemb4 | 1100. Final Standings | 2 Aug 2019 16:43 | 2 |
Hi, why is a problem author talking about bubble sort? And why a lot using stl stable_sort? Where is a differents of stl sort? |