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: 算是模拟 ...
随机推荐
- strlen与sizeof的区别 [转]
转自:http://www.cppblog.com/liangbo/archive/2006/10/06/13394.html 1.sizeof操作符的结果类型是size_t,它在头文件中typede ...
- 题外话(简识UML语言)
PS:“不积小流无以成为江河,不积跬步无以至千里”,学习也好,吃饭也罢,做任何事情都需要一步一个脚印,逐步积累过程,最后才会知识越来越丰富,吃的越饱… 在学习过程中用到了一些框图,用于绘画框图的语言数 ...
- HTML定位(滚动条、元素,视口)定位
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Java中static的用法
static静态,作为修饰符,最初是由c引入,一开始static表示退出一个块后依然存在的局部变量.随后,static表示不能被其他文件访问的全局变量和函数.到了C++和java,static表示属于 ...
- TMS3705A PCF7991AT 线路图
- Java内存区域分析
程序计数器 指令运行的指示器. 每一个线程都有独立的程序计数器,互无影响,我们称这类区域为线程私有的内存. 运行Java方法,计数器记录的是正在运行的虚拟机字节码指令地址;假设运行的是native方法 ...
- C++学习笔记之作用域为类的常量和作用域内的枚举
一.作用域为类的常量 有些情况下,使符号常量的作用域为类很有用.如,类声明(不是定义)可能使用字面值30来指定数组长度,由于该常量对于所有对象来说都是相同的,因此创建一个由所有对象共享的常量是个不错的 ...
- Kubuntu(14.04)共享wifi(热点)
笔记本(kubuntu14.04)通过有线上网,共享本机无线给手机.平板及其他通过wifi上网的设备. 曾经在网上找过各种方法.下载了非常多软件都不能在本机上实现wifi共享,以下这样的方法眼下相对简 ...
- k-means聚类JAVA实例
<mahout in action>第六章. datafile/cluster/simple_k-means.txt数据集例如以下: 1 1 2 1 1 2 2 2 3 3 8 8 8 9 ...
- [Angular2 Router] Style the Active Angular 2 Navigation Element with routerLinkActive
You can easily show the user which route they are on using Angular 2’s routerLinkActive. Whenever a ...