2013年6月29日

Codeforces Round #190 (Div. 2) 解题报告

摘要: -----------------A. Ciel and Dancingn个男孩和m个女孩配对跳舞,每首歌有一对男女跳舞,要求配对男孩和女孩中至少有一个没有跳过舞。求最多的能放的歌曲数并输出配对方案。分析可知最多能放n+m-1首歌曲。----贪心,男孩1和所有的女孩跳舞。女孩1和所有的男孩跳舞。除去男孩1和女孩1重复的情况#include #include #include using namespace std; int main() { int n,m; int s; while (cin>>n>>m) { s=0; ... 阅读全文

posted @ 2013-06-29 21:13 电子幼体 阅读(141) 评论(0) 推荐(0) 编辑

导航