这两天回家了

家里电脑太卡 调试不方便

就只能写写水题了……

 #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<math.h>
#include<string.h>
#include<string>
#include<map>
#include<set>
#include<vector>
#include<queue>
#define M(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef long long ll;
int cnt[];
int main(){
int a,max_=-,sum=,cost=;
for(int i=;i<;i++){
scanf("%d",&a);
sum+=a;
cnt[a]++;
if(cnt[a]==)
cost=a*;
else if(cnt[a]>=)
cost=a*;
if(cost>max_)
max_=cost;
}
printf("%d\n",sum-max_);
return ;
}
/* 7 3 7 3 20 7 9 3 1 8 10 10 10 10 10 */

[ An Ac a Day ^_^ ] CodeForces 680A Bear and Five Cards的更多相关文章

  1. codeforces 680A A. Bear and Five Cards(水题)

    题目链接: A. Bear and Five Cards //#include <bits/stdc++.h> #include <vector> #include <i ...

  2. Codeforces 385C Bear and Prime Numbers(素数预处理)

    Codeforces 385C Bear and Prime Numbers 其实不是多值得记录的一道题,通过快速打素数表,再做前缀和的预处理,使查询的复杂度变为O(1). 但是,我在统计数组中元素出 ...

  3. [Codeforces 639F] Bear and Chemistry (Tarjan+虚树)(有详细注释)

    [Codeforces 639F] Bear and Chemistry(Tarjan+虚树) 题面 给出一个n个点,m条边的无向图(不保证连通,可能有自环和重边),有q次询问,每次询问给出p个点和q ...

  4. Codeforces Round #356 (Div. 2)A. Bear and Five Cards(简单模拟)

    A. Bear and Five Cards time limit per test 2 seconds memory limit per test 256 megabytes input stand ...

  5. Codeforces Round #356 (Div. 2) A. Bear and Five Cards 水题

    A. Bear and Five Cards 题目连接: http://www.codeforces.com/contest/680/problem/A Description A little be ...

  6. Codeforces 791B Bear and Friendship Condition(DFS,有向图)

    B. Bear and Friendship Condition time limit per test:1 second memory limit per test:256 megabytes in ...

  7. Codeforces 791A Bear and Big Brother(暴力枚举,模拟)

    A. Bear and Big Brother time limit per test:1 second memory limit per test:256 megabytes input:stand ...

  8. Codeforces 385D - Bear and Floodlight

    385D - Bear and Floodlight 题目大意:有一个人从( l , 0 ) 想走到 ( r , 0 ),有 n 盏路灯,位置为( xi , yi ),每盏路灯都有一个照射的角度ai ...

  9. Codeforces 791C. Bear and Different Names 模拟构造

    C. Bear and Different Names time limit per test:1 second memory limit per test:256 megabytes input:s ...

随机推荐

  1. 获取Java的32位MD5实现

    获取Java的32位MD5实现 public static String md5(String s) { char hexDigits[] = {'0','1','2','3','4','5','6' ...

  2. java 缓存ehcache的使用(使用方式一)

    实体要序列化 resource文件夹下建立 ehcache.xml <?xml version="1.0" encoding="UTF-8"?> & ...

  3. joda-time的一个DEMO

    Date activeDate = person.getActiveTime(); if(activeDate==null){ modelMap.put("expireDate", ...

  4. [河南省ACM省赛-第三届] 聪明的kk (nyoj 171)

    题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=171 动态规划: d(i,j) = max{d(i-1, j), d(i, j-1)}+m ...

  5. css background-attachment属性

    前提是定义了background-image属性,然后用background-attachment来指明背景图的位置是固定于视口的,还是随着包含块移动的.可简单理解为定义背景图片随滚动轴的移动方式. ...

  6. Wise Registry Cleaner Pro(智能注册表清理) V9.31 绿色版

    软件名称: Wise Registry Cleaner Pro(智能注册表清理)软件语言: 简体中文授权方式: 免费试用运行环境: Win7 / Vista / Win2003 / WinXP 软件大 ...

  7. PHP22期基础班技术总结

  8. KMP算法的实现

    今天看到了一篇关于KMP算法的讲解的文章,很难得,讲得非常清楚.分享给大家,希望对大家有帮助.http://kb.cnblogs.com/page/176818/ 我自己基于这个讲解的内容作了一个实现 ...

  9. java中|与||有什么区别?那么&与&&呢

    ||当左边为真时,就不运行右边的表达式了|当左边为真,还是会运算右边的表达式&&当左边为假时,就不会运算右边的表达式&当左边为假时,还是会运算右边的表达式

  10. IO流数据读写总结

    1.用java自带的IO读写方法 官方API网站:http://docs.oracle.com/javase/7/docs/api/ 2.Apache的Commons-io-2.4.jar中的方法,参 ...