Six days of flooding due to heavy rain have killed dozens and affected half a million people in Thailand.