Search found 36 matches

by mathgirl
Sat Apr 28, 2012 8:39 am
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 22865

Re: 454 Anagrams WA

Ok. I am getting the same output for the input u gave. But still got WA. #include <vector> #include <string> #include <map> #include <algorithm> #include <iostream> #include <cstring> using namespace std; int main() { string word; string empty; int n; map<string,vector<string> > input; vector<string...
by mathgirl
Fri Apr 27, 2012 9:17 am
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 22865

Re: 454 Anagrams WA

I tried that, and got WA again. I m getting frustrated with this. To be clear, 1) lexicographic order means A > a > B > b.... Z > z right ? 2) And my output format is (output 1 starts) <word1><space><=><space><word2> <blank line> (output 2 starts) <word1><space><=><space><word2> <word1><space><=><sp...
by mathgirl
Thu Apr 26, 2012 8:31 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 30628

Re: 195 - WA Anagram I am stumped !!

Thank brian ! I'll make sure to follow this next time. :)
by mathgirl
Thu Apr 26, 2012 8:29 pm
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 22865

454 Anagrams WA

I am repeatedly getting WA on this one. I tried input from the previous posts on this topic and it works correctly. Can anyone please explain why I m getting WA ? #include <vector> #include <string> #include <map> #include <algorithm> #include <iostream> #include <cstring> using namespace std; int m...
by mathgirl
Wed Apr 25, 2012 4:15 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 30628

Re: 195 - WA Anagram I am stumped !!

I got the problem.. it was in the sorting order. I wrote a custom compare function for sort and got accepted. :)
Modifying the original string should work fine on any system. next_permutation is an STL algorithm, so it cant be wrong.
by mathgirl
Tue Apr 24, 2012 6:24 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 30628

195 - WA Anagram I am stumped !!

My code works fine on my system. I have tested it with several inputs..
But i got WA .
Please help !!!

Code: Select all

Code deleted after AC 

Go to advanced search