Search found 8 matches

by vizardo
Tue Jul 28, 2009 8:34 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 53471

Re: 10267 - Graphical Editor

WA WA!! I have read almost the entire forum, but still, I can't get AC. I have tested so many test cases but it's still WA... please help! I have no idea what is wrong now!! :( import java.io.*; import java.util.*; public class Main{ static int row = 0; static int col = 0; static char[][] table; pub...
by vizardo
Sun Apr 26, 2009 1:02 pm
Forum: Volume 3 (300-399)
Topic: 362 - 18,000 Seconds Remaining
Replies: 75
Views: 26817

362 - time limit exceeded... pls help...

I really don't know how to optimize the code more than this... I got time limit exceeded.. :( .. please help...!! import java.util.*; import java.io.*; public class Main{ public static void main(String[] args){ try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringToke...
by vizardo
Fri Apr 24, 2009 11:11 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 191023

Re: 100 - Wrong Answer!! Please help!!

oops... sorry.. my clumsy mistake... i submitted the wrong code... now it's correct already.. hehe.. thanks a lot for your help! very appreciate it! Here is the final version of my code... import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class...
by vizardo
Thu Apr 23, 2009 11:25 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 191023

Re: 100 - Wrong Answer!! Please help!!

I have changed my code based on what you suggested but i still got back time limit exceeded.. :( .. i'm stuck now.. please help!! import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main{ public static int cycle_length(int num){ int count =...
by vizardo
Thu Apr 16, 2009 6:48 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 191023

Re: 100 - Wrong Answer!! Please help!!

This is my new version of the code and i got back Time Limit Exceeded... import java.util.Scanner; public class Main{ public static long cycle_length(long num){ long count = 1; while (num != 1){ if (num%2 == 0){ num = num / 2; } else{ num = num * 3 + 1; } count++; } return count; } public static voi...
by vizardo
Thu Apr 16, 2009 12:06 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 191023

100 - Wrong Answer!! Please help!!

I got back Wrong Answer.. I'm not sure if it is that my code is wrong or there is sth wrong with java submission. Totally have no idea! :( import java.util.Scanner; public class Main{ public static long cycle_length(long num){ long count = 1; while (num != 1){ if (num%2 == 0){ num = num / 2; } else{...
by vizardo
Mon Mar 16, 2009 5:06 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 191023

Is it java problem?? Help pls!

I'm a newbie here.. I have tried 2 questions, the 3n+1 problem and Minesweeper problem. I'm not sure whether my code is wrong or it is java problem, but I always get Runtime Error from the judge. I've looked through the code so many times but I still can't find the reason. Help me pls...! 100 - 3n+1...
by vizardo
Sun Mar 15, 2009 9:49 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 191023

Re: 100

I don't know why but i got response as Runtime error.. here is my code... import java.util.Scanner; class Problem161{ public static long cycle_length(long num){ long count = 1; while (num != 1){ if (num%2 == 0){ num = num / 2; } else{ num = num * 3 + 1; } count++; } return count; } public static voi...

Go to advanced search