Search found 11 matches

by Samleo
Sun Nov 03, 2013 4:39 pm
Forum: Volume 109 (10900-10999)
Topic: 10963 - The Swallowing Ground
Replies: 47
Views: 11394

Re: 10963 - The Swallowing Ground

brianfry713 wrote:Either don't use abs or make your abs function return something.
Thanks :) Solved with that tip :D Stupid mistake
by Samleo
Sun Nov 03, 2013 4:15 pm
Forum: Volume 116 (11600-11699)
Topic: 11661 - Burger Time?
Replies: 37
Views: 10270

Re: 11661 - Burger Time? why WA?

Also WA, but code seems correct? #include<cstdio> #include<cstring> #include<string> using namespace std; #define MAX_N 2000000 int main(){ int l,i; int dist,finalDist; char c; bool jackpot,rest; /* freopen("burger.in","r",stdin); freopen("burger.out","w",stdout); //*/ while(scanf("%d\n",&l)!=EOF){ ...
by Samleo
Sun Nov 03, 2013 10:55 am
Forum: Volume 102 (10200-10299)
Topic: 10227 - Forests
Replies: 23
Views: 8726

Re: 10227 - Forests

Thanks brianfry713, code got AC in the end (even though the algorithm was very unconventional :D)
by Samleo
Sun Nov 03, 2013 10:07 am
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 14676

Re: 10125 - Sumsets

brianfry713 wrote:That code won't compile
Huh? Why?
It works perfectly on my c++ compiler and uva is returning me WA, not CE
by Samleo
Sun Nov 03, 2013 10:05 am
Forum: Volume 116 (11600-11699)
Topic: 11661 - Burger Time?
Replies: 37
Views: 10270

Re: 11661 - Burger Time?

Please help with my WA code :( Or at least post some testcases for me to use for debugging? #include<cstdio> #include<cstring> #include<string> using namespace std; #define MAX_N 2000000 int main(){ int l,i; int dist,finalDist; char c; bool jackpot,rest; /* freopen("burger.in","r",stdin); freopen("b...
by Samleo
Wed Oct 30, 2013 9:01 am
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 14676

Why WA? Any test cases?

I have got WA for this problem a few times.. I use the d-c = a+b algorithm.. Can I hav some datasets to further test the code (all io is correct)? #include<cstdio> #include<algorithm> #include<vector> #include<set> #include<cmath> #include<map> using namespace std; #define LOOP(times) for(int(i) = 0...
by Samleo
Mon Oct 28, 2013 4:07 pm
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 14676

Re: 10125 - Sumsets

@li_kuet wrote:Try this case :D
Input :

Code: Select all

4
-3 -3 -3 -9
0
Output :

Code: Select all

-9
The output is wrong I thot? All numbers in the set must be distinct..
by Samleo
Mon Oct 28, 2013 1:56 pm
Forum: Volume 102 (10200-10299)
Topic: 10227 - Forests
Replies: 23
Views: 8726

Re: 10227 - Forests

I have edited my code a bit so that it prints lines between each output, but it still gets WA.. Is there any testcases that I can use to check my code (my algorithm is very unconventional, but would still work)? #include <cstdio> #include <algorithm> #include <vector> #include <set> #include <cstrin...
by Samleo
Tue Oct 22, 2013 12:56 pm
Forum: Volume 109 (10900-10999)
Topic: 10963 - The Swallowing Ground
Replies: 47
Views: 11394

Re: 10963 - The Swallowing Ground

Why is my code getting WA? I am printing the lines properly, have passed all test inputs on the forum.. But still WA :(

Code: Select all

CODE REMOVED AFTER AC
Would appreciate some help and test inputs :)
Thanks,
Sam
by Samleo
Sun Dec 09, 2012 9:58 am
Forum: Volume 102 (10200-10299)
Topic: 10227 - Forests
Replies: 23
Views: 8726

Re: 10227 - Forests

/* I have been getting wrong answer as well. My algorithm is a little unconventional, but it should still work.. Tested it and it worked on all the inputs in the forum... Algorithm (quite unconventional): Will be using a 2d array heard[people][trees] to store all values. If the tree is heard, value ...
by Samleo
Mon Dec 03, 2012 3:00 pm
Forum: Volume 104 (10400-10499)
Topic: 10452 - Marcus
Replies: 21
Views: 9190

Re: 10452 - Marcus, help!

Hi, I got WA for my code (below) and I really can't understand why. Can someone help me to see if there is something wrong with my code? Thanks. (It's recursive code btw) #include <iostream> #include <fstream> #include <math.h> #include <string.h> using namespace std; #define LOOP(times) for(int(i)=...

Go to advanced search