标签:
[2016-03-08][651][[codeforces]][B][Beautiful Paintings]#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> using namespace std; typedef long long LL; #define CLR(x,y) memset((x),(y),sizeof((x))) #define FOR(x,y,z) for(int (x)=(y);(x)<(z);++(x)) #define FORD(x,y,z) for(int (x)=(y);(x)>=(z);--(x)) #define FOR2(x,y,z) int (x);for((x)=(y);(x)<(z);++(x)) #define FORD2(x,y,z) int (x);for((x)=(y);(x)>=(z);--(x)) int cnta[1000 + 10]; int main(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); int n,x;CLR(cnta,0); scanf("%d",&n); FOR(i,0,n){ scanf("%d",&x); ++cnta[x]; } int maxk = 0; FOR(i,0,1009) maxk = max(maxk,cnta[i]); printf("%d\n",n - maxk); return 0; } |
[2016-03-08][651][codeforces][B][Beautiful Paintings]
标签:
原文地址:http://www.cnblogs.com/qhy285571052/p/5263915.html