## Search found 12 matches

Wed Aug 03, 2011 2:02 am
Forum: Volume 3 (300-399)
Topic: 386 - Perfect Cubes
Replies: 53
Views: 6890

### 386 - Perfect Cubes [WA]

I've compared the output using FC with some other's output and they match, can anybody tell what's going on? #include <cstdio> #include <cmath> #include <iostream> #include <cstdlib> using namespace std; bool cubes[80000001]={false}; struct lc { int num; int i, j, k; } list[500]={0,0,0,0}; int cmp(c...
Sun Feb 27, 2011 3:51 pm
Forum: Volume 114 (11400-11499)
Topic: 11466 - Largest Prime Divisor
Replies: 29
Views: 15341

### Re: 11466 - Largest Prime Divisor

I've been gulping loads of WAs on this. I've read about negative numbers and have handled them in both the ways that I've seen on uvatookit.com and another blog. But still can't figure the problem out. I do a sieve till 10000000 then store all primes. Keep on dividing the given number the list ends ...
Thu Dec 09, 2010 10:36 pm
Forum: C
Topic: Bsearch---built in
Replies: 4
Views: 4579

### Re: Bsearch---built in

If you're talking about bsearching on an array of structs then you need to have your query in the same kind of struct. Then just customize the compare function for strcmp(), if that's what u r asking.
Thu Dec 09, 2010 10:31 pm
Forum: Volume 108 (10800-10899)
Topic: 10812 - Beat the Spread!
Replies: 35
Views: 17753

### Re: Beat the spread -getting WA

You're printing the two numbers on separate lines. They should be on the same line. See the problem's output sample. I don't think there is any other fault.
Thu Sep 23, 2010 9:00 pm
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 19433

### Re: 424 - Integer Inquiry RE

The memory limits are enough why use so small limits on arrays. Use 1000.
Thu Sep 23, 2010 8:53 pm
Forum: Java
Topic: How to know what was the Wrong Answer
Replies: 3
Views: 4483

### Re: How to know what was the Wrong Answer

UVA OJ doesn't provide answers it is getting from your program. It's done partially in USACO but not even a bit in UVA. If you're stuck at some prob, just browse the forum for it. People usually provide a lot of help.
Thu Sep 23, 2010 8:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10197 - Learning Portuguese
Replies: 45
Views: 15524

### Re: 10197 - Learning Portuguese

I got WA with my code. It has been a very frustrating experience. Tip 1: Test these ir is there something wrong? ar ar falar what is this namer coder jubir jubir Outputs ir (to is there something wrong?) eu o tu es ele/ela e nós imos vós is eles/elas em ar (to ar) eu o tu as ele/ela a nós amos vós ...
Wed Sep 22, 2010 12:07 am
Forum: Volume 101 (10100-10199)
Topic: 10197 - Learning Portuguese
Replies: 45
Views: 15524

### Re: 10197 - Learning Portuguese

You can't use the "nos" and "vos" as copy-paste strings in the array. For them you have to use 243 explicitly. Like this: for (i=0 ; i<6 ; i++) { if (i==3) { putchar('n'); putchar(243); putchar('s'); } else if (i==4) { putchar('v'); putchar(243); putchar('s'); } else printf("%s",t_rep[i]); for (j=1 ...
Tue Sep 07, 2010 11:37 pm
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 17793

### Re: 11462 - Ages Sort

Can anyone please tell me about the fast I/O? I know fread() fwrite() is what it is. But can u give me an example of it being done?
Fri Sep 03, 2010 1:46 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 36055

### Re: 583 - Prime Factors

I spent a lot of time with TLE, then RTE now WA. Please someone suggest me something: :evil: Concept: 1 Generate sieve upto 60000 2 Then while the number stays the division is done from the primes[] array. EDIT: Sorry, I had left some RUNTIME CHECK statement in. Got AC. You guys are doing a great jo...
Thu Apr 08, 2010 5:08 am
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 24816

### Re: 119 Why WA??

One of the craziest hard-to-get-AC experience To get AC you need three things. 1. Check Jan's Sample I/O in this thread and correct it. 2. Check these Sample I/0 and correct it. Input 2 Fat Dude Fat 1000 0 Dude 100 1 Fat Output Fat 100 Dude -100 3. Print a blank line after each case except the last ...
Mon Mar 29, 2010 9:41 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 16643

### Re: 369 WA even if it works for every test case i found :S

@aliahmed
Just don't reset k for k>=(n/2). It works.