mehrdad专题

Arpa's weak amphitheater and Mehrdad's valuable Hoses

背包问题?!+并查集 一组朋友之中最多只能有一个人去,所以需要在写0-1背包时需要调整for循环的顺序 错解: for(int i=1;i<=n;i++){sum_b=0,sum_w=0;if(pre[i]==i){for(int j=0;j<vn[i].size();j++){sum_b+=bn[vn[i][j]];sum_w+=wn[vn[i][j]];for(int k=w;k>=

Arpa’s hard exam and Mehrdad’s naive cheat

找规律 There exists an island called Arpa’s land, some beautiful girls live there, as ugly ones do. Mehrdad wants to become minister of Arpa’s land. Arpa has prepared an exam. Exam has only one quest

CodeForces 742B Arpa’s obvious problem and Mehrdad’s terrible solution

B. Arpa’s obvious problem and Mehrdad’s terrible solution time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are some

Codeforces 742A Arpa’s hard exam and Mehrdad’s naive cheat

http://codeforces.com/contest/742/problem/A A. Arpa’s hard exam and Mehrdad’s naive cheat time limit per test 1 second memory limit per test 256 megabytes input standard input output

Arpa's weak amphitheater and Mehrdad's valuable Hoses CodeForces - 742D

Arpa’s weak amphitheater and Mehrdad’s valuable Hoses CodeForces - 742D 题目描述 Just to remind, girls in Arpa’s land are really nice. Mehrdad wants to invite some Hoses to the palace for a dancing par

codeforces 742B - Arpa’s obvious problem and Mehrdad’s terrible solution

B. Arpa’s obvious problem and Mehrdad’s terrible solution time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are some

Codeforces Round #383 (Div. 2) C. Arpa's loud Owf and Mehrdad's evil plan —— DFS找环

题目链接:http://codeforces.com/contest/742/problem/C   C. Arpa's loud Owf and Mehrdad's evil plan time limit per test 1 second memory limit per test 256 megabytes input standard input output