Cod sursa(job #73375)
Utilizator | Data | 18 iulie 2007 10:29:33 | |
---|---|---|---|
Problema | Cutii | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 1.1 kb |
#include <iostream>
#include <string>
#include <hash_map.h>
using namespace std;
/** BEGIN FIX **/
namespace std
{
template<> struct hash< std::string >
{
size_t operator()( const std::string& x ) const
{
return hash< const char* >()( x.c_str() );
}
};
}
/** END FIX **/
hash_map <string, int> months;
int main(void) {
months["january"] = 31;
months["february"] = 28;
return 0;
}