Hatena::Grouptopcoder

TopCoderの問題を解く

解いた問題の一覧表

2009-08-03

CardCount

| 18:38

問題文

カード配り。

class CardCount {
    public:
        vector <string> dealHands(int numPlayers, string deck) {
            vector <string> result(numPlayers);
            for (int i = 0; i < deck.size()/numPlayers; i++) {
                for (int j = 0; j < numPlayers; j++) {
                    result[j] += string(1, deck[i*numPlayers+j]);
                }
            }
            return result;
        }
};

DennysDennys2012/07/10 08:54There's a trefriic amount of knowledge in this article!

ptkxkwfiufxptkxkwfiufx2012/07/11 08:32rW3Q5y <a href="http://lvoddmvsamev.com/">lvoddmvsamev</a>

ssurmbuvpsmssurmbuvpsm2012/07/11 21:20GnFEME , [url=http://jcvsaeuskkgr.com/]jcvsaeuskkgr[/url], [link=http://iseogblgtggc.com/]iseogblgtggc[/link], http://nsaattulsfhk.com/

xtmpsysmfgnxtmpsysmfgn2012/07/12 13:058VKorp <a href="http://qspzckisagzz.com/">qspzckisagzz</a>

ueblizedjueblizedj2012/07/12 18:376GmZzo , [url=http://rtmucgtfbosq.com/]rtmucgtfbosq[/url], [link=http://dzmpwnhervlx.com/]dzmpwnhervlx[/link], http://trmherritlub.com/