Codeforces 344B Simple Molecules
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
int ab=a+b-c,bc=b+c-a,ac=a+c-b;
if(ab>=0&&bc>=0&&ac>=0&&ab%2==0&&bc%2==0&&ac%2==0)
printf("%d %d %d\n",ab/2,bc/2,ac/2);
else
printf("Impossible\n");
return 0;
}
Codeforces 344B Simple Molecules的更多相关文章
- CodeForces - 344B Simple Molecules (模拟题)
CodeForces - 344B id=46665" style="color:blue; text-decoration:none">Simple Molecu ...
- codeforces B. Simple Molecules 解题报告
题目链接:http://codeforces.com/problemset/problem/344/B 题目意思:这句话是解题的关键: The number of bonds of an atom i ...
- Simple Molecules(简单)
Simple Molecules time limit per test 1 second memory limit per test 256 megabytes input standard inp ...
- codeforces Simple Molecules
link:http://codeforces.com/contest/344/problem/B 刚开始想复杂了.一开始就想当然地以为可以有多个点,其实,人家题目要求只有3个点啊! 然后题目就简单了. ...
- Codeforces 626E Simple Skewness(暴力枚举+二分)
E. Simple Skewness time limit per test:3 seconds memory limit per test:256 megabytes input:standard ...
- CodeForces 570B Simple Game 概率
原题: http://codeforces.com/contest/570/problem/B 题目: Simple Game time limit per test1 second memory l ...
- codeforces 962F.simple cycle(tarjan/点双连通分量)
题目连接:http://codeforces.com/contest/962/problem/F 题目大意是定义一个simple cycle为从一个节点开始绕环走一遍能经过simple cycle内任 ...
- cf B. Simple Molecules
http://codeforces.com/contest/344/problem/B #include <cstdio> #include <cstring> using n ...
- Codeforces 665C Simple Strings【暴力,贪心】
题目链接: http://codeforces.com/contest/665/problem/C 题意: 改变最少的字符,使得最终序列无相同的连续的字符. 分析: 对每一个与前一个字符相同的字符,枚 ...
随机推荐
- 报错:org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n ...
- 02.28 day03
print(1 or 3 > 2 and 4 < 5 or 6 and 2 < 7)## while True:# print(11)# print(22)# # break# # ...
- JS 手机号中间4位变星号
一:正则方法 var str1 = '13991367972'var reg = /^(\d{3})\d*(\d{4})$/;var str2 = str1.replace(reg,'$1****$2 ...
- int (*a)[10]和int *a[10]的区别
有点晚了,放个链接,睡觉. https://stackoverflow.com/questions/13910749/difference-between-ptr10-and-ptr10
- centos7 firewalld日常使用
若生产中使用有docker,建议不要使用firewalld,改用iptables,用firewalld坑很多,暂时还未找到解决办法,在此做下记录: 说明:若加参数permanent为永久添加即添加至z ...
- 我们需要了解的五个ERP趋势
企业的全面现代化进程伴随着ERP的发展.在2019年,预计规模较小的供应商将加大力度,双层ERP(Two-Tier ERP)将开始占据市场份额,企业也将要求更加灵活的ERP的实施方案. 该预测基于咨询 ...
- LeetCode(57) Insert Interval
题目 Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if nece ...
- LeetCode 309. Best Time to Buy and Sell Stock with Cooldown (stock problem)
Say you have an array for which the ith element is the price of a given stock on day i. Design an al ...
- 【转】错误: ORA-01591: 锁被未决分布式事务处理 7.2.428982 持有--解决方案
SQL 错误: ORA-01591: 锁被未决分布式事务处理 7.2.428982 持有 01591. 00000 - "lock held by in-doubt distributed ...
- Vue编写轮播组件引入better-scroll插件无法正常循环轮播
临近过年还是发个博客表示一下自己的存在感,这段时间公司突然说想搞小程序,想到这无比巨大的坑就只能掩面而泣,于是乎这段时间在学习小程序开发.关于标题所说的是有老铁问的,我也跟着网上的代码码了一遍然后发现 ...