[ An Ac a Day ^_^ ] CodeForces 680A Bear and Five Cards
这两天回家了
家里电脑太卡 调试不方便
就只能写写水题了……
#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的更多相关文章
- codeforces 680A A. Bear and Five Cards(水题)
题目链接: A. Bear and Five Cards //#include <bits/stdc++.h> #include <vector> #include <i ...
- Codeforces 385C Bear and Prime Numbers(素数预处理)
Codeforces 385C Bear and Prime Numbers 其实不是多值得记录的一道题,通过快速打素数表,再做前缀和的预处理,使查询的复杂度变为O(1). 但是,我在统计数组中元素出 ...
- [Codeforces 639F] Bear and Chemistry (Tarjan+虚树)(有详细注释)
[Codeforces 639F] Bear and Chemistry(Tarjan+虚树) 题面 给出一个n个点,m条边的无向图(不保证连通,可能有自环和重边),有q次询问,每次询问给出p个点和q ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- Codeforces 385D - Bear and Floodlight
385D - Bear and Floodlight 题目大意:有一个人从( l , 0 ) 想走到 ( r , 0 ),有 n 盏路灯,位置为( xi , yi ),每盏路灯都有一个照射的角度ai ...
- 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 ...
随机推荐
- Oracle 收集统计数据
查看最新用户表统计信息 select owner,table_name,last_analyzed from dba_tables where owner not like '%SYS%' order ...
- line-height属性详解
line-height属性详解:http://www.cnblogs.com/dolphinX/p/3236686.html
- rocketmq(1)
参考: 开源社区:https://github.com/alibaba/RocketMQ rocketmq入门: http://www.cnblogs.com/LifeOnCode/p/4805953 ...
- SQL 分组排序、CASE...WHEN...、是否为空 查询
select Id,CustomerCode,CustomerName,CreateId,CreateName,Phone,StatusName,(case when phone is not nu ...
- ueditor1.4.3 在IE8下的 BUG
ueditor1.4.3 .net 版 在IE8 下,多图片上传完成后,点击确认时报错,无法插入图片到编辑器中 原因是 ueditor.all.js 中的 24835 行 if (whitList[ ...
- 连续多个git提交发生了冲突时
git checkout -b test 创建并切换到分支test git clone git branch master git merge test 合并test到master (git merg ...
- Error js内置错误 js处理错误流程 Throw语句
Exceptional Exception Handling in JavaScript MDN资料 Anything that can go wrong, will go wrong. ...
- jenkins自动部署war包到jetty
1.把jenkins.war包复制到jetty的webapps下面 2.在jetty的webapps下面新建jenkins.xml文件 内容如下: <?xml version="1.0 ...
- 【转】Freemarker输出$和html标签等特殊符号
原文:http://blog.csdn.net/achilles12345/article/details/41820507 场景:程序员都不喜欢看文档,而更喜欢抄例子.所以,我们把平台组的组件都做成 ...
- rxJava rxandroid 学习
学习地址 很全面: http://blog.csdn.net/meegomeego/article/details/49155989 final String[] words = {"Hel ...