| Show all threads Hide all threads Show all messages Hide all messages |
| Java Time limit exceeded | ManYang | 1001. Reverse Root | 12 Sep 2012 08:55 | 1 |
my code do not have compile error, but it still can not work, I do not know where went wrong. import java.lang.*; import java.util.*; /** * * @author manyang */ public class Timus_1001 { //create a arraylist from input //donot konw how to play with arraylist, use a array public static void main(String[] args){ double num[] = new double[10000];//10000 is not precise, should determined by 256kb Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int i = 0; double result = Math.sqrt(sc.nextDouble()); num[i] = result; i++; } /*for arraylist, use arrayName.length output reversely calc each for array, use num[i] */ for (int i = num.length - 1; i >=0; i--) {
System.out.printf("%.4f", num[i]); System.out.println(); } }
}
|
| To admins: weak tests. | Lerie[ONPU-12] | 1005. Stone Pile | 11 Sep 2012 23:31 | 1 |
My AC solution gives wrong answer on this test: 5 100 30 50 30 90 Right answer: 0 |
| WA #7 | andy777 | 1820. Ural Steaks | 11 Sep 2012 16:11 | 2 |
WA #7 andy777 25 Jan 2012 01:46 what is in the test #7? here is my program var n,k:longint; begin readln(n,k); if (n<=k) then write(2*n) else if (n mod k=0) then write(trunc(2*n/k)) else write(trunc(1+(n-(n mod k))/k+((n-abs(k-(n mod k)))-((n-abs(k-(n mod k))) mod k))/k+((n-abs(k-(n mod k))) mod k)/k)); end. my sotution is WA#7 too. help me,pls |
| What for 13 test? | Dhonny | 1702. Crossroad | 11 Sep 2012 07:01 | 4 |
Does anybody know what the 13-th test is? Edited by author 07.04.2009 15:16 Also Wa15. What are wrong: 1. There are 17 choices 2. Greedy: we choice lexiographic best result at each step. unfortunately the problem is not of greedy type full search according all solutions of equation 10=k1+...+k17 helped to solve. Edited by author 21.10.2009 10:04 I agree with you, svr. Full search works fine. There are only 5311735 different configurations. |
| wich is the test 3 | daynier | 1049. Brave Balloonists | 11 Sep 2012 01:12 | 1 |
|
| Time limit exeeded error | Darwesh | 1083. Factorials!!! | 10 Sep 2012 19:44 | 1 |
I don't know why this error occurs, even the execution time is less then the time limit???? Please help me out?
|
| what is test3???I couldn't be wrong! | Childish | 1042. Central Heating | 10 Sep 2012 18:59 | 1 |
|
| to Admins, about WA 3 | cupidon4uk [Lviv_NU] | 1823. Ideal Gas | 10 Sep 2012 00:21 | 3 |
Hi. I find out that test #3 looks like this : p = 3 V = 4 n = 0 When we need to find T, answer will be "undefined" if and only if n = 0 (because, in this way, we get division by zero). In second and in third tests n=0, and we need to find T. I wrote code like this : if( we need find T ) { if( n==0 ) printf("undefined\n"); } But, in this way, I get WA 3. What is wrong? Please, check test, or, if I made mistake, help me figure it out. Thanks. Edited by author 16.07.2012 01:48 the answer is "error" because there is no solution Edited by author 21.08.2012 15:16 But in this case I get WA 2, changing only one string in my code. |
| Странное условие. | -XraY- | 1250. Sea Burial | 9 Sep 2012 19:35 | 1 |
Добрый день! Я сдал эту задачу, и у меня возникли трудности с условием. Во-первых, нигде не написано, что такое "внутри моря". Во-вторых, когда я догадался до значения вышеупомянутого термина, я не уловил смысла в следующем предложении: "Острова, касающиеся границы карты, не могут быть использованы для захоронений шаманов – шаманы этого очень не любят". Острова, находящиеся на границе, точно не лежат внутри никакого моря. В связи с этим, у меня возникло предположение, что ответ на следующий тест - 1 (что вроде неверно): 5 7 1 1 ..... .#### .#... .#.#. .#... .#### ..... (в ответ входит маленький островок справа). Поправьте условие, пожалуйста! |
| How can I calculate my code's excute time ? | Pegasus | | 9 Sep 2012 19:34 | 1 |
|
| Mistake in statement | Fyodor Menshikov | 1370. Magician | 9 Sep 2012 17:36 | 1 |
"Write the number that will appear in the window of the magic machine after the rotation." I think 'number' is not a correct definition of a sequence of digits with possible leading zeros. So 8907712345 is number, but 0771234589 is not. So I propose to replace 'number' with 'sequence of digits'. |
| What is the meaning "Test #" ?(Please tell me) | Pegasus | | 9 Sep 2012 10:21 | 1 |
And what the meanging about the number under"Test #" ? |
| TL 21 | ibra (TNU) | 1752. Tree 2 | 9 Sep 2012 04:13 | 1 |
TL 21 ibra (TNU) 9 Sep 2012 04:13 Если у вас TL 21 то попробуйте тест у которого корень с 19999 сыновей. Это именно такой тест |
| My mistake. | cypherq | 1510. Order | 8 Sep 2012 15:25 | 2 |
Edited by author 15.06.2010 15:54 |
| Where is the mistake? | LiSu | 1877. Bicycle Codes | 7 Sep 2012 21:20 | 1 |
#include <stdio.h> #include <conio.h> #include<string.h> #include <stdlib.h> int main () { char n[4],m[4]; int a,b;
scanf("%s%s",&n,&m); a=atoi(n); b=atoi(m); if(a==0 || a%2==0 || b%2==1 ) printf("yes"); else printf("no"); getch(); return 0 ;
} |
| what is the crash error?please help me | Milad | 1049. Brave Balloonists | 7 Sep 2012 16:26 | 1 |
this is my code so what is the crash error # include <iostream> # include <vector> using namespace std; const int maxN=10000+10; int p[maxN],t[maxN]; vector <int> v; int main () { int n,sum=1;
for (int i=2;i<=maxN;i++) for (int j=2*i;j<=maxN;j+=i) p[j]=1; for (int j=1;j<=10;j++) { cin>>n; for (int i=2;i<=n;i++) { int len = n; while (len>1 && !p[i] && len%i==0) { len/=i; v.push_back(i); } } }
for (int i=0;i<v.size();i++) t[v[i]]++; for (int i=2;i<maxN;i++) if (t[i]>0) { t[i]++; sum*=t[i]; sum%=10; } cout<<sum%10; //cin>>n; return 0; } |
| eps``` | fcjy | 1839. The Mentaculus | 7 Sep 2012 15:36 | 1 |
|
| Bug in 14 test. | -XraY- | 1172. Ship Routes | 7 Sep 2012 12:27 | 2 |
You have some trash in this test after the usefull part. So, my multitest failed it firstly. |
| tl#40? i use suffix array! nlogn! why? | EfremovAleksei | 1393. Average Common Prefix | 7 Sep 2012 08:40 | 2 |
i also use suffix array.but i can ac it. It's O(nlogn + n). |
| WA15 | TinyJanssen | 1893. A380 | 6 Sep 2012 00:21 | 2 |
WA15 TinyJanssen 6 Sep 2012 00:14 What is different with case #15. My program runs good for 14 tests. |