hi...
I've got WA for 10227 of uva...
here's my code:

#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>

using namespace std;

int main()
{
        //freopen ("10227.in", "r", stdin);
        int t;
        cin >> t;
        string str;
        getline (cin, str);
        getline (cin, str);
        int P, T;
        int x, y;
        for (int i = 0; i < t && cin >> P >> T; i++)
        {
                vector < vector <int> > v (101);
                set <string> s;
                getline (cin, str);
                while (getline (cin, str) && str != "")
                {
                        stringstream ss (str);
                        ss >> x;        ss >> y;
                        if (x > 0 && y > 0)
                                v[x].push_back (y);
                }
                for (int j = 1; j <= P; j++)
                        sort (v[j].begin(), v[j].end());
                for (int j = 1; j <= P; j++)
                {
                        stringstream ss;
                        for (int k = 0; k < v[j].size(); k++)
                                ss << v[j][k];
                        s.insert (ss.str());
                }
                cout << s.size() << endl;
                if (i != t-1)
                        cout << endl;
        }
        return 0;
}

please help me to got ACC...It makes me crazy!!!

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to