polycarp专题

Codeforces Round #346 (Div. 2) F. Polycarp and Hay 并查集 bfs

老规矩,先抄一波qsc的,自己的写在后面https://www.cnblogs.com/qscqesze/p/5342366.html   F. Polycarp and Hay 题目连接: http://www.codeforces.com/contest/659/problem/F Description The farmer Polycarp has a warehouse with h

CodeForces - 1006B. Polycarp's Practice

Polycarp is practicing his problem solving skill. He has a list of nn problems with difficulties a1,a2,…,ana1,a2,…,an , respectively. His plan is to practice for exactly kk days. Each day he has to so

Polycarp's phone book

对于001,1处理会出问题的情况,再所有的数字前面再加一个1,就变成1001和11,区分开来了, itoa函数codefoeces上c++14才有 #include<iostream>#include<string.h>#include<stdio.h>#include<map>#include<string>#include<stdlib.h>using nam

Codeforces #494 A. Polycarp's Pockets

A. Polycarp's Pockets废话不多说,直接上AC程序!#include<bits/stdc++.h>using namespace std;int n,x;int t[101];int main(){scanf("%d",&n);for (int i=1;i<=n;i++){scanf("%d",&x);t[x]++;}int maxx=0;for (int i=1;i<=