|
|
Common Board Edited by author 24.01.2011 11:02 Does any one know that case? Edited by author 24.01.2011 10:45 Greetings! I've been reading FAQ about C# and noticed, that memory boundaries aren't specified via command-line arguments (as they are in Java). Isn't it a secret, how Timus team manage to set memory limits for c# then? // The thing is that I will be first-time helping with organization of some contests in our region, so my interest has a practical nature. :-) I do not understand when you have finished receiving data, and that if no effect then enter receive data never end, so never would show the results and would be an endless repetitive cycle. now with that key, or as I have to request new data, since no effect enter then I have no idea how to stop the cycle does not specify how to stop it. greetings. have you tested your program on your machine? How can we use eof without opening file?? WTH with it? I can't understand anything! FPC 2.0 doesn't compiling it. And Embarcadero RAD Studio XE too! So, What The Hell with it? Here's my solution : - Input & reverse all the edges - DFS from all vertexs - If depth = N then output in reverse order What's wrong w/ this one ???? the graph may be not connected. I was WA#2 and now I get Ac, because: Graph can be not connected I got WA#2 too, but I thought that the graph is supposed to be not connected. Can help me identify my errors , here's my solution : - I reverse all the edges - DFS from the vertex without any other vertex pointing to - Count the depth, if depth = number of vertex -> output in reverse order 3Q,i made the same mistake,and i now get AC i have written algorithm that uses log2() which is in c++(<cmath> library) and when i used it copmpilation error occured "error C3861: 'log2': identifier not found" when i compile it in devc++ it works perfectly.. can everyone helm me? :( Timus use the compiler visual c++ compiler not gcc. hint: log2(n) = log(n)/log(2) (but this sum at the complexity) Edited by author 21.01.2011 22:32 Edited by author 21.01.2011 22:32 Timus use the compiler visual c++ compiler not gcc. hint: log2(n) = log(n)/log(2), (but this sum at the complexity) По башке себе постучи, дятел :) По башке себе постучи, дятел :) Ни к тебе вопрос был. Нечего по делу сказать - "иди лесом". Edited by author 19.01.2011 20:26 Edited by author 19.01.2011 20:27And what are the cheat you detected? Edited by author 21.01.2011 20:18 for i := 2 to n do begin min:=maxlongint; for j := 1 to trunc(sqrt(i)) do if min>f[i-j*j] then min:=f[i-j*j]; f[i]:=min+1; end; rt who can help me? I need help! What is the test number 3? I wa the test3,too. Who can help us? with code like this if(lmastery-dmastery>maxdif) maxdif = lmastery - dmastery; i got WA 10 but with if(lmastery-dmastery>maxdif+1e-9) maxdif = lmastery - dmastery; i got AC I havn't rools for choosing right value eps=1e-9. Insread I use more 10 times already my unit for long arithmetics and have Ac. In this problem I used fraction of tipe LongA/longA. Of couse authors used flouts but my exact arithm and author's rounding floats correspond and it is very very surprisingly. Except for roudindg problem is very simple and dosn't demand any optimization for time and memory. Why I have worng anserw in test #2?? My code: #include <cstdio> #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; string nazwa[5000]; int wartosc[1000], wartosc2[1000], x, koniec = n-1, pocz = 0, min = 1, max = 10000, summin = 0, summax = 0; for (int i=0; i<n; i++) { cin >> nazwa[i]; cin >> x; if (x == 1) cin >> wartosc[i]; if (x == 0) wartosc[i] = 0; wartosc2[i] = wartosc[i]; }
for (int i = koniec; i>=0; i--) { if (wartosc[i] == 0) wartosc[i] = min; else min = wartosc[i]; summin += wartosc[i]; }
for (int i = pocz; i < n; i++) { if (wartosc2[i] == 0) wartosc2[i] = max; else max = wartosc2[i]; summax += wartosc2[i]; }
if ( summin < 10000 && 10000 < summax) cout << "YES"; else cout << "NO"; getchar(); getchar(); return 0; system("PAUSE"); } Edited by author 24.01.2011 01:13 There is theory of Ramsei. if you want 4 you need 5 points. if you want 5 you need 9 points. Edited by author 03.02.2009 14:53 Thanks for 9 and for Ramsei. Owing to your post I've read something of theory of Ramsei. And I find it enough curious. Thanks for it. Thanks a lot. Very interesting theory. here is my code int main() { double l, h, w,N,angle; double P=3.14; double g=9.81,t,speed; cin>>l>>h>>w; t=sqrt(2*h/(g*100)); speed=w/60; N=t*speed; angle=N*360; while(angle>360) { angle=angle-1; } if(angle>90 && angle<270) cout<<"bread"; else cout<<"butter"; //system("pause"); } i think you need to remember about l in counting time te total hight should be h-0,5l because you must remember that after h-0,5l it can spin arround. and you have few more mistakes but i'm not sure of that because my one its not perfect to is the problem as easy as it seems or there is some trick? ACM problems r never easy except a very few which i have solved.please provide some test cases. now getting TLE for test 19 can somebody please suggest some hints to solve the problem. try to check the variant when n = 1 |
|
|