Search found 8 matches

by mostruash
Tue Jul 01, 2014 10:01 pm
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7578

Re: 140 - bandwith

#include <iostream> #include <memory> #include <string> #include <list> #include <sstream> #include <cmath> using namespace std; #define MAX_NV 8 #define MAX_L 26 bool edges[MAX_NV][MAX_NV]; int map[MAX_L]; int rmap[MAX_NV]; int min_bandwidth; string min_order; void split(string &s, char delim, lis...
by mostruash
Mon Jun 16, 2014 12:55 am
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7578

Re: 140 - bandwith

Yeah, that is possible I guess. I'll fix my code and let you know. Thanks.

Edit: I fixed that (i.e. omitted duplicate nodes on the left hand side of the colon) but still getting WA. I wonder what other critical case that I'm missing...
by mostruash
Fri Jun 13, 2014 9:28 am
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25725

Re: 119 Why WA??

Whatever compiler the default is in XCode 5.1.
by mostruash
Thu Jun 12, 2014 9:32 pm
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7578

Re: 140 - bandwith

Thanks again. #include <iostream> #include <memory> #include <string> #include <list> #include <sstream> #include <cmath> using namespace std; #define MAX_NV 8 #define MAX_L 26 bool edges[MAX_NV][MAX_NV]; int map[MAX_L]; int rmap[MAX_NV]; int min_bandwidth; string min_order; void split(string &s, ch...
by mostruash
Thu Jun 12, 2014 7:55 pm
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25725

Re: 119 Why WA??

Huh... Not on my compiler (llvm latest version). Thank you brianfry713.
by mostruash
Thu Jun 12, 2014 5:44 pm
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25725

Re: 119 Why WA??

I'm unfortunately getting Runtime Error. Tried all test cases available on the boards. #include <iostream> #include <cstdio> #include <string> #include <map> #include <cstring> #include <sstream> #define CLEAR(arr) (memset(arr, 0, sizeof(arr))) #define BUFF 250 using namespace std; map<string, int> ...
by mostruash
Thu Jun 12, 2014 5:27 pm
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7578

Re: 140 - bandwith

I tried that too, still WA.
by mostruash
Wed May 28, 2014 10:45 pm
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7578

Re: 140 - bandwith

So what's wrong with my code (getting WA)? Passes all test cases here: #include <iostream> #include <memory> #include <string> #include <list> #include <sstream> #include <cmath> using namespace std; #define MAX_NV 8 #define MAX_L 26 bool edges[MAX_NV][MAX_NV]; int map[MAX_L]; int rmap[MAX_NV]; int ...

Go to advanced search