| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| WA #8 | Marginean Ciprian | 1753. Книжная полка | 20 мар 2010 16:14 | 1 |
WA #8 Marginean Ciprian 20 мар 2010 16:14 Does it mean that we need to calculate the maximal displacement where the center goes even when it falls? And after the book starts falling must we consider that the book just rotates around the edge of the bookshelf? or it slides a little backwards. Some more explanation of the problem text and maybe some hints would be welcomed. Thank you. L.E. Now I get WA 8. I don't think there is a problem with precision, or something like that. Some more samples to pass this test? Does L have to be used at anything? I believe not since L>H. L.L.E. My WA 8 was from a division by 2 of an integer variable, which I assigned to a double variable. The problem was solved when I divided by 2.0 Edited by author 25.03.2010 20:20 |
| curiously, g++, version 4.3.2 build it. But your Intel didn't. | [neUSU]And_IV | 1640. Кольцо холода | 20 мар 2010 03:12 | 2 |
#include<iostream> #include<algorithm> #include <list> #include <math.h> #include <iomanip> using namespace std; /*CODE*/ int main() { /*CODE*/ cout<<setprecision(9)<<fixed<</*CODE*/ <<sqrt(r2); return 0; } Using proprietary Intel compiler instead of free and de facto standard GCC is outrageous! I guess ФАС should investigate how this happened :-) |
| Test 10 | marks | 1490. Огненный круг | 20 мар 2010 02:34 | 2 |
What's wrong with the test 10? #include<stdio.h> int main(){ long unsigned int x,y=0,z=0,q,p,r; scanf("%lu",&r); x=r; q=r*r; do{ p=q-y*y; while( x*x >= p && x >= 0 )x--; z+=(x+1); y++; }while(y<r); z*=4; printf("%lu\n",z); return 0; } Используй long long и/или long double |
| 1 TEST | →MOPDOBOPOT← | 1711. Кодовые имена | 20 мар 2010 00:07 | 1 |
1 TEST →MOPDOBOPOT← 20 мар 2010 00:07 |
| Compilation problem (STL set/map) | Igel_SK [VNTU] | | 19 мар 2010 21:12 | 1 |
Submitting one problem I had a compilation error with making my own set comparator, although the program had succesfully been compiled by G++(GCC) 4.4.3 and Visual Studio 2008 compilers on my computer. By submitting some test programs I've found that the error is somehow related to the lower/upper_bound method of map and set containers. For instance, the code like this gets a compilation: #include <set> using namespace std; struct Less { bool operator()(pair <int,int> a, pair <int,int> b) { return a.first < b.first; } }; set <pair <int,int> , Less> s; set <pair <int,int>, Less>::iterator it; int main() { s.insert(make_pair(1,1)); it = s.lower_bound(make_pair(0,1)); return 0; }
The error message is following: 5bf1d001-ac4d-4354-a106-244d4befaf4e S:\checker\compile\\Vc7\include\xtree(988): error: no instance of function "Less::operator()" matches the argument list and object (the object has cv-qualifiers that prevent a match) argument types are: (const std::pair<int, int>, const std::_Tree<std::_Tset_traits<std::pair<int, int>, Less, std::allocator<std::pair<int, int>>, false>>::key_type) object type is: const Less if (this->comp(_Key(_Pnode), _Keyval)) ^ detected during: instantiation of "std::_Tree<_Traits>::_Nodeptr std::_Tree<_Traits>::_Lbound(const std::_Tree<_Traits>::key_type &) const [with _Traits=std::_Tset_traits<std::pair<int, int>, Less, std::allocator<std::pair<int, int>>, false>]" at line 801 instantiation of "std::_Tree<_Traits>::iterator std::_Tree<_Traits>::lower_bound(const std::_Tree<_Traits>::key_type &) [with _Traits=std::_Tset_traits<std::pair<int, int>, Less, std::allocator<std::pair<int, int>>, false>]" at line 21 of "5bf1d001-ac4d-4354-a106-244d4befaf4e" compilation aborted for 5bf1d001-ac4d-4354-a106-244d4befaf4e (code 2) So I think that it makes some STL features unavailable and wish it to be fixed. |
| WA at test #5 (Pascal) | Valentina | 1153. Суперкомпьютер | 19 мар 2010 20:04 | 1 |
Does anybody know what can this test contain? I get WA every time I send my solution, can anybody give me some advice? If you need my code, you can connect me on the ICQ (425805594) |
| Q 1021 Sacretment of the Sum | Creastery™ | 1021. Таинство суммы | 19 мар 2010 18:44 | 10 |
Thanks for everybody for the help. Removed code :) Edited by author 04.08.2011 16:55 Like how do you do binary search? Can you list an example? input(a); input(b); bool ok = false; for( int i = 0; i < a.size(); i++ ) if ( binary_search(b, 10000 - a[i]) ) ok = true; What is the type of a and b? IMHO simply Hash Table is faster =) // WHY IS THIS WRONG !! #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n,x; vector <int> N; cin>>n; for(int a=0; a<n; a++){ cin>>x; N.push_back(x); } cin>>n; for(int a=0; a<n; a++){ cin>>x; N.push_back(x); } sort(N.begin(), N.end()); n=N.size(); bool t(1); for(int a=0; a<n; a++){ if(binary_search(N.begin(), N.end(), 10000-N[a])){ cout<<"YES"; t=0; break; } } if(t) cout<<"NO"; return 0;} why you add second list in N ? I think (i don't now c++) [code deleted] (I recieve this code ang get AC) Please reply on this messge I have to delete it after =) Edited by author 13.01.2010 20:35 Oh, sorry ! Now I realize my mistake.. I misunderstood the question! Thank You ! :) delete this: if (lista[a]+listb[x]>10000) { continue; } else if (lista[a]+listb[x]<10000) { break; } rewrite this: if(valuea[a]+valueb[x]==10000) { cout<<"YES"; break; } else break; you ca adapt this ideea good luck |
| Does this problem requires the route with minimum stops? | November Rain | 1137. Автобусные маршруты | 19 мар 2010 04:16 | 4 |
I think at one stop which is the start stop of another route,we can print that route start with the common stop.But this is not the solution with the minimum stops.I got wa on test 1.I'm confused.Can anybody help me? My code: [code cut out] Edited by moderator 09.08.2004 02:40 I have WA#1 too. But I think that my program must work correctly. I always output the route with a number of stops equal to the m_1+m_2+...+m_n (m_k is a number of stops in k_th route). So I have a question: for input 2 4 1 2 3 4 1 4 1 2 3 4 1 should I output 4 1 2 3 4 1 or the output 8 1 2 3 4 1 2 3 4 1 is also OK? I haven't looked November Rain's program yet, but I suspect he to have the same algorithm that I have. 2 4 1 2 3 4 1 4 1 2 3 4 1 Test is incorrect "None of the routes shared the same section of road" |
| WA#26 | VorobeY1326 | 1027. Снова D++ | 18 мар 2010 23:30 | 3 |
WA#26 VorobeY1326 11 окт 2009 21:38 Who knows, what contains this test?? Please, heeeelp!!!) And tell me please - can test contain russian letters, or only latin? (*хахахах-это русский текст!!*) - answer is NO or YES? Re: WA#26 † Ленин † [Yaroslavl SU] 18 мар 2010 23:30 My program says (*хахахах-это русский текст!!*) // YES Test 26 is possibly consists from many '(', if you use in your program stack then size of stack must be more then 255. I think it's better to use a variable that counts open brackets '(' |
| No subject | [UCTeam] Borzunov Alexander [hX] | | 18 мар 2010 23:19 | 1 |
No subject [UCTeam] Borzunov Alexander [hX] 18 мар 2010 23:19 If solutions really will be execute faster if I will use threads (Delphi TThread)? If this possible? Edited by author 18.03.2010 23:21 |
| Why???? | Iliya | 1710. Борис, ты не прав! | 18 мар 2010 21:49 | 3 |
Could you help me. Why the answer in first test is YES. why not -2 0 -1 4 4 0 Sorry. I have found my mistake. Please tell me why it can't be. I have the same answer on this test |
| Brute-force - AC 0.015 | Cat36 | 1261. Чаевые | 18 мар 2010 21:30 | 2 |
Nothing to wonder: log_3(2^32) < 21, thus you need to test at most 2^21 possibilities. |
| Hints & tests | unlucky^2 [Vologda SPU] | 1278. “… Connecting People” | 18 мар 2010 15:31 | 1 |
1.Amount of calls "BELL&RET" must be equal to K. 2.Some tests, to check & understand problem :) 1 BELL&RET 2 CALL 1 BELL&RET 3 CALL 2 CALL 2 BELL&RET 4 CALL 1 CALL 2 BELL&RET 5 CALL 3 CALL 2 CALL 3 BELL&RET 6 CALL 1 CALL 3 CALL 3 BELL&RET 7 CALL 4 CALL 2 CALL 4 CALL 4 BELL&RET |
| Информация о операторе ">?=" / Information about ">?=" op | SKYDOS | | 18 мар 2010 15:04 | 1 |
поделитесь где найти какую-то инфу по этому оператору. i need any information about this op in C++. спасибо большое заранее. thanks a lot. |
| Help!How to slove this problem? | tob | 1382. Игра с карточками | 18 мар 2010 11:26 | 3 |
Can I just search,or there're some other better ways? |
| 3 is NOT the magic digit | Tony Beta Lambda | 1033. Лабиринт | 18 мар 2010 10:50 | 1 |
7 is! Edited by author 18.03.2010 10:51 |
| x==n, y==m? | Adler3D | 1755. Торт | 18 мар 2010 03:49 | 2 |
|
| help!! | chenxiang | 1180. Игра с камушками | 18 мар 2010 00:14 | 2 |
help!! chenxiang 23 ноя 2006 17:42 i am freshman in learning c. so please help me to solving this pulzz. what is the meaning of " while (!feof(stdin)) "? while(stream stdin hasn't finished) |
| WA#1 | QAFQAZkamran | 1123. Зарплата | 17 мар 2010 23:59 | 1 |
WA#1 QAFQAZkamran 17 мар 2010 23:59 can u send me test # 1 or another test which has the same property with test#1. i think my program works correctly..... |
| DP for O(n^3) | [Ural SU] GetTester | 1181. Разрезание окрашенного многоугольника | 17 мар 2010 21:32 | 3 |
I got AC with O(n^3) solution, based on DP. I suppose, that testcases are too weak. Anyway, I think, that it's not normal to get AC for O(n^3) solution. ) My solution is n3, but it doesn't have to check all posibilities. Some part of array f[][] is never used. Besides, I don't know a better way. It is not O(n^3): the expected number of tests for each sub-interval is 2 and thus DP is O(n^2). |