| Show all threads Hide all threads Show all messages Hide all messages |
| WA for test #5 | Luan Nguyen | 1090. In the Army Now | 24 Feb 2009 15:55 | 2 |
Could anyone show me what the input for test #5 is? I can't figure out why my solution fails this test case. Thanks a lot. Try this test 3 3 1 2 3 3 1 2 3 2 1 right answer is 3 Edited by author 05.03.2009 18:22 |
| Question | OpenGL | 1307. Archiver | 24 Feb 2009 11:34 | 2 |
'The archive is compiled and executed with the same parameters and restrictions that are used for compiling and executing the submitted program containing the solution of the problem.' It means, what the maximum size of archive is 64 KB? Edited by author 11.01.2009 16:39 |
| How to solve this problem? | Genesis | 1627. Join | 23 Feb 2009 18:57 | 16 |
I already found a way to convert the graph to a matrix, and the ans is the determinant of this matrix. But it seems so hard to get it. There is another way to solve this problem I have AC now, but can you E-mail me your method please ykt836@gmail.com, thanks Hi Genesis, Can You give me hint how did you to mod the determinant. I am having problem with it. Edited by author 19.08.2008 09:39 Of course, the usual way of solving such problems is DP by profile. But method of Genesis is much more easier to implement. Thank you for idea! I used JAVA's BigInteger, I can mod the determinant just before I print it One can use extended euclid to do all calculations modulo 10^9 straightforwardly One can use extended euclid to do all calculations modulo 10^9 straightforwardly 10^9 isn't a prime number! How will you find for example ( 1/10 ) mod 10^9 ? I used BigInteger and Kirgoff determinant theorem. Dp or divide and concur approach seems unimplementing. Interesting who used nondeterminant approach. i can't understand. when i solve the determinant of the matrix, there are decimal fraction indeed. how can you avoid it? can you tell me in detail? yumen , can not pass test 5. I know simple and fast way to calculate the determinant of matrix by the integer modulo... But I don't understand, how convert graph to a matrix((( test 1 - 0110 1001 1001 0110 - det =0 I used article in wiki with key words Kirgoff theorem 2 Cat36: Mail to nick@inbox.ru using goryinyich as nick and I'll explain to you what you want, and you'll explain to me what I want =))) Sorry, 3 weeks offline(( if it's still interest you, icq 4n7;8h8h8;0/3'3'5 (only digits) |
| Who can tell me how to read 'данные'? | данные | 1000. A+B Problem | 23 Feb 2009 18:51 | 2 |
I need someone to help me read the word. If you would like to help me please connect me at lkmail2@gmail.com Thank you very much Edited by author 21.02.2009 11:56 Thanks for Fyodor Menshikov!:) |
| My method | wu hao | 1196. History Exam | 23 Feb 2009 15:48 | 2 |
Just use binary search. Becase the teacher's list is in ascending order. We can solve the problem in O(mlogn). We can use binary not if only list in ascending order, but we can sort it in O(nlogn) |
| Why I had TL on4-th test? | oli666 | 1196. History Exam | 23 Feb 2009 15:34 | 1 |
My solution is: #include <iostream> //#include <conio.h> using namespace std; int prepod[15000], n; int binsearch(int num) { int l = 0, r = n - 1, m; while (r - l > 1) { int m = (r + l) / 2; if (prepod[m] == num) return 1; if (prepod[m] > num) l = m; if (prepod[m] > num) r = m; } if ((prepod[l] != num) && (prepod[r] != num)) return 0; else return 1; } int main() { int m, student, s=0; cin>>n; for (int i = 0; i < n; i++) scanf ("%i", &prepod[i]); cin>>m; for (int i = 0; i < m; i++) { scanf ("%i", &student); s+=binsearch (student); } cout<<s; //getch(); return 0; } And it has time O(mlogn) and it is about 9e+6. |
| WHO CAN HELP ME?Please..... | K-A-R-E-N(YSU) | 1133. Fibonacci Sequence | 23 Feb 2009 11:08 | 2 |
WHAT TYPE CAN I GIVE fib(100) ???????? __int64 or long long? Hm... __int64 and long long are identical here. But according to the condition −2·10^9 <= Fk <= 2·10^9 simple int is sufficient for all Fk |
| WHEN n is an odd number,the answer is 1,WHY? | chenyuxi | 1044. Lucky Tickets. Easy! | 23 Feb 2009 10:46 | 5 |
WHY? I passed the problem,but I didn't understand this point. Please help! They don't have odd N test, mine treat odd N as n-1 and I got AC. the question have not odd number |
| about memory limit(Virtual address space RULEZ) | [neUSU]And_IV | 1000. A+B Problem | 23 Feb 2009 10:38 | 2 |
#include<iostream> #include<algorithm> #include <iomanip> using namespace std; int cc[0x0FFFFFFF]; int main() { cc[0x0FFFFFF]=13; int a,b; cin>>a>>b; cout<<a+b; return 0; } 0x0FFFFFFF -256M Maybe optimizer throws out your array? If to do cin >> cc[0x0ffffffd] >> cc[0x0ffffffe]; cout << cc[0x0ffffffd] + cc[0x0ffffffe]; ? |
| Same code - different results! | Ostap Korkuna (Lviv NU) | 1132. Square Root | 22 Feb 2009 21:38 | 1 |
After the rejudge my previously accepted solution got TL. Today I logged in to the site, copy-pasted my old solution (from the site), submitted it and... surprisingly got AC! Admins, don't you think it's strange? And the time my program worked is 0.39 - far from TL... Here are the ID's of my submits: 1526885 - TL 2460193 - AC |
| Get me WA#4 test | De5 | 1644. A Whole Lot of Walnuts | 22 Feb 2009 20:33 | 1 |
|
| Problems !!! Help me!! WA #2 | De5 | 1648. Yachts | 22 Feb 2009 18:26 | 1 |
program verv; var a : array [1 .. 20000] of Integer; d, d2, min, k, n, i, j : Longint; begin k := 0; Readln (n, d); d2 := 0; for i := 1 to n do begin Read (a[i]); if ((d - a[i]) > 0) then begin min := d - a[i]; for j := i + 1 to n do Read (a[j]); Break; end; end; for i := 1 to n do begin if ((d + d2) - a[i]) > 0 then begin if ((d + d2) - a[i]) < min then min := (d + d2) - a[i]; d2 := d2 + (d - a[i]); k := k + a[i]; end else k := k + d; end; Writeln (k, ' ', min); end. SHE DONT can AC !!!! Please help me Edited by author 22.02.2009 18:27 |
| Why Error №1 ? | Kirill | 1581. Teamwork | 22 Feb 2009 17:44 | 1 |
Please, help. var A,I,b,Top:integer; Na,Nb:array[1..1000]of integer; procedure OneNumber; begin Nb[1]:=1; Readln(Nb[2]); Top:=2; end; begin readln(a); if a=1 then OneNumber else begin for i:=1 to A do readln(Na[i]); B:=1; Top:=1; for i:=2 to A do if NA[i]=NA[i-1] then begin inc(b); if i=a then begin Nb[Top]:=b;inc(Top);Nb[Top]:=Na[i];end;end else begin Nb[Top]:=b;inc(top);NB[Top]:=Na[i-1];inc(Top);B:=1; if i=a then begin Nb[Top]:=b;inc(Top);Nb[Top]:=Na[i]; end;end;end; for i:=1 to Top do write (Nb[i]); end. |
| Can anybody tell me numbers of problems that can be solved with bipartite matching in graph? | Lebedev_Nicolay[Ivanovo SPU] | | 22 Feb 2009 17:23 | 1 |
|
| more than 9 3andls | [neUSU]And_IV | 1659. Regular Triangles | 22 Feb 2009 15:33 | 2 |
can more than 9 3andls be?? Yes. Vladimir Yakovlev (USU) 22 Feb 2009 15:33 |
| WA#2 | darkhac | 1675. Lunar Code 2 | 21 Feb 2009 20:47 | 1 |
WA#2 darkhac 21 Feb 2009 20:47 if matrix 2*3 ________ |__|__|__| |__|__|__| and 1 line and 1 column is zero => ________ |_#|_#|_#| |_#|__|__| => if in empty cell is 0 => 2 column is zero => l>1 => all empty cell is 1 => 1 variant |
| A+B | Afina | 1000. A+B Problem | 21 Feb 2009 11:38 | 3 |
A+B Afina 10 Oct 2008 23:03 I don't understand why I get wrong answer: #include <stdio.h> #include <stdlib.h> main() { float a,b; printf("Enter a:"); scanf("%f",&a); printf("Enter b:"); scanf("%f",&b); printf("a+b=%3.2f",a+b); system("PAUSE"); return 0; } Edited by author 10.10.2008 23:04 Re: A+B Vladimir Yakovlev (USU) 10 Oct 2008 23:59 Your program outputs this instead of just "6" for sample: Vvedite a:Vvedite b:a+b=6.00 See examples of correct solutions in the FAQ Re: A+B Brisan Alex 21 Feb 2009 11:38 This problem is solved to complicate.In C++ the correct answer is: #include<iostream.h> long a,b; int main() { cin>>a>>b; cout<<a+b; return 0 } |
| Why this code is showed wrong answer in problem 1001 | nattapong | 1001. Reverse Root | 21 Feb 2009 10:42 | 1 |
I don't understand that my code below get wrong answer.It can show the correct answer.Anyone, please advise me. import java.util.Scanner; public class root { public static void main(String[]args){ Scanner in = new Scanner(System.in); long a = in.nextLong(); long b = in.nextLong(); long c = in.nextLong(); long d = in.nextLong();
System.out.printf("%.4f \n",Math.sqrt(d)); System.out.printf("%.4f \n",Math.sqrt(c)); System.out.printf("%.4f \n",Math.sqrt(b)); System.out.printf("%.4f \n",Math.sqrt(a)); } } |
| Is it right? | Kopeliovitch Sergey (1) | 1057. Amount of Degrees | 21 Feb 2009 03:54 | 5 |
Test: B = 3 K = 2 X = 90 Y = 100 Result: 2 Is it right? If not what is the right result of this test and why? Right answer is 1: 90=3^2+3^4 Good luck! 1 2147483647 15 2 right answer = 300540195? |
| the task is incorrect | kobra | 1069. Prufer Code | 20 Feb 2009 13:22 | 4 |
Prufer code is not N-1!!! Its should be N-2, because the last number always N. For example if I will get the numbers: 1 1 1 1 1, its impossible to build this graph. About this possible to read here: http://en.wikipedia.org/wiki/Pr%C3%BCfer_sequenceWhat does it change to a solution to the problem? |