This question already has an answer here:
Say I have an address with 1000 different 0.01BTC outputs. I send all of the outputs (in separate transactions) to the 48% SatoshiDICE address. At the same time, I craft a transaction for each of the outputs that sends the money back to myself. Once I find out which of the bets succeeded, I start mining. I include the SatoshiDICE bets where I won, and I cancel the ones where I lost (using the conflicting transaction I generated earlier). So basically if I mine the next block, I cancel all the bets where I lost, and only keep the ones where I won. My question is, what percent of the network hashrate do I need to make this profitable?