Search found 12 matches

by jfvs
Fri Jul 15, 2011 10:48 pm
Forum: Volume 101 (10100-10199)
Topic: 10115 - Automatic Editing
Replies: 29
Views: 9766

Re: 10115 - Automatic Editing

No shababhsiddique, the 2 rule states that when you are done with one rule you are to move to the next rule and you cant use the rules used already. I had some troubles with this problem... but I'm quite sure that the WA that you guys are getting are because of the 3 rule in the problem statement.
by jfvs
Fri May 27, 2011 6:36 am
Forum: Volume 4 (400-499)
Topic: 492 - Pig-Latin
Replies: 213
Views: 26337

Re: 492 - Pig Latin

why do you output 10htay from the line 10th amr saqr? Im getting WA... and I think that my code is correct... import java.io.*; import java.util.*; public class p492 { static boolean is_vowel(char c){ switch(c){ case 'a': case 'e': case 'i': case 'o': case 'u': case 'A': case 'E': case 'I': case 'O'...
by jfvs
Sun Apr 24, 2011 11:29 am
Forum: Volume 7 (700-799)
Topic: 706 - LCD Display
Replies: 221
Views: 36080

Re: 706 - LC-Display

hi everyone I dont know if you already solved your problem with this WA... as a tip to solve it, check carefully your condition to make your program stop, maybe you're not prossessing the whole input (that was my problem) Also, for those claiming that you dont need a extra space after the last test ...
by jfvs
Fri Apr 15, 2011 3:29 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 187998

Re: 100 on Java

exactly, just that, you just need something like

Code: Select all

Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
             //your code
}
by jfvs
Fri Apr 15, 2011 3:22 am
Forum: Volume 4 (400-499)
Topic: 401 - Palindromes
Replies: 196
Views: 32320

Re: 401- Palindromes

I dont know whats wrong with my code... I have tried all the test cases in this forum... could you help me out please? #include <cstdio> #include <string.h> using namespace std; int main(){ char mirror[] = {'A',0,0,0,'3',0,0,'H','I','L',0,'J','M',0,'O',0,0,0,'2','T','U','V','W','X','Y','5','1','S','...
by jfvs
Tue Apr 12, 2011 7:55 am
Forum: Volume 1 (100-199)
Topic: 111 - History Grading
Replies: 135
Views: 22572

Re: 111 Wrong answer

Maybe you are ignoring some special case... thats all that I can tell you, because I can't really analice your code, there are missing parts like the method 'findLongestComonSequence' maybe It is a java method, but Im more of a c++ programmer so...
by jfvs
Mon Apr 11, 2011 5:17 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 187998

Re: 100 on Java

I just noticed something...

you just do the program so it would compute just 1 result, do it for multiple input, the uva test case file is very long, no just one line...

hope this helps
by jfvs
Sun Apr 10, 2011 8:25 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 187998

Re: 100 on Java

first, I dont know if java can do it in time... and why are you doing this? long i = sc.nextInt(); use the sc.nextLong(); and at the end, you are doing this: if (t1 < t2) { System.out.println(i + " " + j + " " + lleng); } else { System.out.println(j + " " + i + " " + lleng); } try this instead Syste...
by jfvs
Fri Apr 01, 2011 1:43 am
Forum: Volume 2 (200-299)
Topic: 264 - Count on Cantor
Replies: 47
Views: 13961

Re: 264

thanks draco... my code was getting WA because I was missing that new line... shouldnt it be PE?... just wondering about that
by jfvs
Thu Mar 31, 2011 8:50 pm
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 8118

WA in 263... help please

Im getting WA in this C++ code, I got the java version of this accepted... so I dont know whats happening here... #include <cstdio> #include <algorithm> #include <map> #include <string.h> #include <cstdlib> using namespace std; void ltos(long n, char *c){ long copy = n; int size = strlen(c), i = siz...
by jfvs
Mon Mar 28, 2011 10:40 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 187998

Re: 100- 3n+1 problem Why WA?

Does anyone knows why Im getting WA with this code? #include <cstdio> #include <map> using namespace std; map<int, int> mp; int rec(int i){ if(i == 1){ return 1; }else if(mp.find(i) != mp.end()){ return mp[i]; }else { mp[i] = (i % 2 == 0)? rec(i / 2) + 1 : rec((3 * i) + 1) + 1; return mp[i]; } } int...
by jfvs
Wed Feb 02, 2011 10:44 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17767

Re: 369 / 530 : Combinations : WAs all the way,Please Help

I dont know if you have got AC yet, but you have an error on your algorithm in the combinFnc function. Check this part for(i=0;divList[i]!=0;i++) { for(j=0;multList[j]!=0;j++) { if((multList[j]%divList[i])==0){ multList[j]/=divList[i]; break; } } } Is where your error is, the calculation is wrong fo...

Go to advanced search