codeforces 680A A. Bear and Five Cards(水题)
题目链接:
//#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <cstring>
#include <algorithm>
#include <cstdio> using namespace std;
#define Riep(n) for(int i=1;i<=n;i++)
#define Riop(n) for(int i=0;i<n;i++)
#define Rjep(n) for(int j=1;j<=n;j++)
#define Rjop(n) for(int j=0;j<n;j++)
#define mst(ss,b) memset(ss,b,sizeof(ss));
typedef long long LL;
template<class T> void read(T&num) {
char CH; bool F=false;
for(CH=getchar();CH<''||CH>'';F= CH=='-',CH=getchar());
for(num=;CH>=''&&CH<='';num=num*+CH-'',CH=getchar());
F && (num=-num);
}
int stk[], tp;
template<class T> inline void print(T p) {
if(!p) { puts(""); return; }
while(p) stk[++ tp] = p%, p/=;
while(tp) putchar(stk[tp--] + '');
putchar('\n');
} const LL mod=1e9+;
const double PI=acos(-1.0);
const LL inf=1e14;
const int N=1e5+; int a[],flag[];
int main()
{
int sum=;
for(int i=;i<=;i++)read(a[i]),sum+=a[i],flag[a[i]]++;
int ans=sum;
for(int i=;i<=;i++)
{
if(flag[a[i]]>&&flag[a[i]]<)
ans=min(ans,sum-flag[a[i]]*a[i]);
else if(flag[a[i]]>)
{
ans=min(ans,sum-*a[i]);
}
}
cout<<ans<<"\n"; return ;
}
codeforces 680A A. Bear and Five Cards(水题)的更多相关文章
- 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 680B B. Bear and Finding Criminals(水题)
题目链接: B. Bear and Finding Criminals //#include <bits/stdc++.h> #include <vector> #includ ...
- codeforces 653A A. Bear and Three Balls(水题)
题目链接: A. Bear and Three Balls time limit per test 2 seconds memory limit per test 256 megabytes inpu ...
- codeforces 658A A. Bear and Reverse Radewoosh(水题)
题目链接: A. Bear and Reverse Radewoosh time limit per test 2 seconds memory limit per test 256 megabyte ...
- codeforces Gym 100187L L. Ministry of Truth 水题
L. Ministry of Truth Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/p ...
- Codeforces Round #185 (Div. 2) B. Archer 水题
B. Archer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/312/problem/B D ...
- Educational Codeforces Round 14 A. Fashion in Berland 水题
A. Fashion in Berland 题目连接: http://www.codeforces.com/contest/691/problem/A Description According to ...
- Codeforces Round #360 (Div. 2) A. Opponents 水题
A. Opponents 题目连接: http://www.codeforces.com/contest/688/problem/A Description Arya has n opponents ...
- Codeforces Round #190 (Div. 2) 水果俩水题
后天考试,今天做题,我真佩服自己... 这次又只A俩水题... orz各路神犇... 话说这次模拟题挺多... 半个多小时把前面俩水题做完,然后卡C,和往常一样,题目看懂做不出来... A: 算是模拟 ...
随机推荐
- 谈Android四大组件之Service篇
Service简介 Service是Android系统中的四大组件之一,它是一种长生命周期的,没有可视化界面,运行于后台的一种服务程序.Service必须在AndroidManifest.xml中声明 ...
- linux如何安装MyEclipse 2014
http://jingyan.baidu.com/article/0320e2c1cced031b87507b08.html
- 一个优秀windows C++程序员的知识体系[转]
转自:一个优秀windows C++程序员的知识体系 思考一个优秀windows C++ 程序员该有哪些知识,可最终发现什么知识都不能少, 看下图: 除了上面知识,程序员还要不断学习, 保持对新知识的 ...
- Find n‘th number in a number system with only 3 and 4
这是在看geeksforgeeks时看到的一道题,挺不错的,题目是 Given a number system with only 3 and 4. Find the nth number in th ...
- (1)html开头解说与案例演示
看完后也可以参考http://www.cnblogs.com/csxiaoyu/p/5228889.html http://www.cnblogs.com/zfc2201/p/5429252.html ...
- Jdk和Jre目录和三个lib目录说明----外部扩展jar包servlet,mysql,oracle等
以下文章转载自a personal blog:For Future,因为昨天下午在cmd模式下编译servlet失败,后来在网上找到这篇文章帮我解决了该问题,我觉得挺值得收藏的,并且这篇文章对&quo ...
- 【转】linux下awk内置函数的使用(split/substr/length)
转自:http://gdcsy.blog.163.com/blog/static/12734360920130241521280/ 一.split 初始化和类型强制 awk的内建函数sp ...
- [转]iOS应用性能调优的25个建议和技巧
写在前面 本文来自iOS Tutorial Team 的 Marcelo Fabri,他是Movile的一名 iOS 程序员.这是他的个人网站:http://www.marcelofabri.com/ ...
- C语言(1+1+2+1+2+3....+n)
#include<stdio.h> void main(){ int i,j,a; long sum=0; //输入a的值 scanf("%d",&a); if ...
- mvc cookie
Response.Cookies["userName"].Value = "ddd"; <% if (Request.Cookies[" ...