Search found 15 matches

by Sarmento
Fri Nov 28, 2003 1:14 am
Forum: Volume 104 (10400-10499)
Topic: 10420 - List of Conquests
Replies: 68
Views: 25978

Already solved it. I hadn't noticed that the women could have more than two names... Silly me...

Thanks

joao
by Sarmento
Wed Nov 26, 2003 10:18 pm
Forum: Volume 104 (10400-10499)
Topic: 10420 - List of Conquests
Replies: 68
Views: 25978

10420 - List of Conquests

Why do I keep getting WA? Thanks [c] #include <stdio.h> #include <stdlib.h> #include <string.h> int comp_chars(char * char1, char * char2){ int ret = strcmp(char1,char2); if (ret < 0) ret = -1; else if (ret > 0) ret = 1; return ret; } int main(){ int n, i, j; char a [80], b[80]; char s [2001][80]; s...
by Sarmento
Mon Oct 06, 2003 6:49 pm
Forum: Volume 8 (800-899)
Topic: 839 - Not so Mobile
Replies: 21
Views: 8218

You were right. Got AC. Thanks, UFP2161.
by Sarmento
Wed Oct 01, 2003 12:07 am
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 45800

673 Need Help

It seems to be working just fine... till the moment I submit it... Can anyone give me a clue why? [c] include <stdio.h> #include <string.h> int n, i,j, length; char str[130]; void rem_chars(int a){ int x; char ret[length]; for (x = 0; x < length; x++){ if (x < a){ ret[x] = str[x]; } else if (x > a+1...
by Sarmento
Tue Sep 30, 2003 6:06 pm
Forum: Volume 8 (800-899)
Topic: 839 - Not so Mobile
Replies: 21
Views: 8218

839 - Why the WA?

Can anyone help me out? I dunno why I get WA. I tried out all the input I could find/create and the answer is accurate. Maybe I'm missing something. [c] #include <stdio.h> int balanced; void mobile(int *weight){ int w1, d1, w2, d2; scanf("%d %d %d %d",&w1,&d1,&w2,&d2); if (balanced == 1){ if (w1 == ...
by Sarmento
Sun Apr 27, 2003 12:10 am
Forum: Volume 4 (400-499)
Topic: 414 - Machined Surfaces
Replies: 49
Views: 9001

414-Is anything wrong with my code? The answers are correct

All the answers seem to be correct. I don't know why I get WA..... Can anyone help me out? Thanks in advance, joao sarmento [java] import java.io.*; class Main{ public static void main (String args[]){ Main myWork = new Main(); // create a dinamic instance myWork.Begin(); // the true entry point } v...
by Sarmento
Thu Apr 24, 2003 1:26 am
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16056

It's easier to simply programme this in C. When will this guys use a more recent version of the language compiler?

Thanks anyway,

joao
by Sarmento
Wed Apr 23, 2003 8:53 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 35532

I decided to try another aproach (more C like), and it was Acc(P.E.). Thanks joao sarmento [java] import java.io.*; class Main{ public static void main (String args[]){ Main myWork = new Main(); // create a dinamic instance myWork.Begin(); // the true entry point } void Begin(){ int c = 0; boolean c...
by Sarmento
Wed Apr 23, 2003 6:22 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16056

Then how am I supposed to solve this one using java? It's impossible? Can't I use double and then cast it to int?
by Sarmento
Wed Apr 23, 2003 5:11 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16056

By the way, the prob is 113...
by Sarmento
Wed Apr 23, 2003 5:10 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16056

Really Big Numbers in Java

What's the data type that supports the biggest numbers in java? Is it double? I'm getting WA from the judge and I guess it's because of that.....

Thanks,

joao sarmento
by Sarmento
Wed Apr 23, 2003 4:52 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 35532

How do I check for the EOF in java? In C you have '\0', but how about in Java? Is the "\n" too?
by Sarmento
Wed Apr 23, 2003 1:48 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 35532

Line by line or the whole thing

In this problem you should fetch sentence by sentence, transform and print it or fetch them all and just then transform and print them?
by Sarmento
Wed Apr 23, 2003 1:09 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 19162

382 - Why am I getting WA?

Can anyone help out with this one. My prog seems to be working perfectly, but I still get WA... The Java support of the online-judge, should be improving ASAP. Thanks in advance, joao sarmento [java] // @JUDGE_ID: 30701AE 382 Java import java.io.*; import java.util.*; class Main { static String Read...
by Sarmento
Tue Apr 22, 2003 10:01 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 35532

Problem 272 - Why is it a wrong answer?

Can anyone tell me what's the problem with this????? It's converting all the sentences perfectly..... Thanks in advance, joao sarmento [java] // @JUDGE_ID: 30701AE 272 Java import java.io.*; class Main{ static String ReadLn (int maxLg){ byte lin[] = new byte [maxLg]; int lg = 0, car = -1; String lin...

Go to advanced search