2012-02-18から1日間の記事一覧

Codeforces 151 B. Phone Numbers

問題 n人の人の電話帳のデータが与えられる。 電話番号のうち、 全ての桁が同じ数字のものはタクシーの番号であり、 全ての桁が降順に並んでいるものは、ピザ屋の番号であり、 その他の番号は全てガールフレンドの番号である。 タクシーの番号、ピザ屋の番号…

Codeforces 151 A. Soft Drinking

問題 k本のボトルがあり、それぞれlリットルの飲料が入っている。 c個のライムがあり、それぞれをd枚にスライスする。 pグラムの塩がある。 トースト一枚につき、nlリットルの飲料、 1枚のライムのスライス、npグラムの塩が必要である。 n人が、平等にトース…

Codeforces C++0x版テンプレ

ソースコード #include<iostream> #include<sstream> #include<algorithm> #include<map> #include<set> #include<queue> #include<complex> #include<cstdio> #include<cstdlib> #include<cstring> using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) #define all(c) (c).begin(),(c).end() #define pb emplace_b…</cstring></cstdlib></cstdio></complex></queue></set></map></algorithm></sstream></iostream>