1. C++, Andreas Kunft

#include <set>

#include <list>

#include <iostream>



using namespace std;



/*

 * ACM Programming Contest

 * Problem:     484 (The Department of Redundancy Department)

 * Status:        Accepted

 * Language:    C++

 * Runtime:        0.260

 * Date:        2009-03-25 13:49:07

 * Author:        Andreas Kunft

 */

int main()

{

    int n;

    list<int> input;

    list<int>::const_iterator itr;

    multiset<int> mSet;

    multiset<int>::const_iterator mItr;

    while (scanf("%d", &n) != EOF)

    {

        bool found = false;

        for (itr = input.begin(); itr != input.end(); itr++)

        {

            if (*itr == n)

            {

                found = true;

                break;

            }

        }

        if (!found)

            input.push_back(n);

        mSet.insert(n);

    }



    for (itr = input.begin(); itr != input.end(); itr++)

    {

        cout << *itr << " " << mSet.count(*itr) << endl;

    }



    return 0;

}