cf B. Simple Molecules
http://codeforces.com/contest/344/problem/B
#include <cstdio>
#include <cstring>
using namespace std; int main()
{
int a,b,c;
int t1=,t2=,t3=;
while(scanf("%d%d%d",&a,&b,&c)!=EOF)
{
bool flag=false;
for(int i=; i<=a; i++)
{
t1=i;
if(b-i>=)
{
t2=b-i;
if(c-(b-i)==a-i)
{
flag=true;
t3=c-(b-i);
break;
}
}
}
if(flag)
printf("%d %d %d\n",t1,t2,t3);
else
printf("Impossible\n");
}
return ;
}
cf B. Simple Molecules的更多相关文章
- Simple Molecules(简单)
Simple Molecules time limit per test 1 second memory limit per test 256 megabytes input standard inp ...
- CodeForces - 344B Simple Molecules (模拟题)
CodeForces - 344B id=46665" style="color:blue; text-decoration:none">Simple Molecu ...
- codeforces Simple Molecules
link:http://codeforces.com/contest/344/problem/B 刚开始想复杂了.一开始就想当然地以为可以有多个点,其实,人家题目要求只有3个点啊! 然后题目就简单了. ...
- codeforces B. Simple Molecules 解题报告
题目链接:http://codeforces.com/problemset/problem/344/B 题目意思:这句话是解题的关键: The number of bonds of an atom i ...
- cf A Simple Task---线段树
Examples Input 10 5abacdabcda7 10 05 8 11 4 03 6 07 10 1 Output cbcaaaabdd Input 10 1agjucbvdfk1 10 ...
- B. Simple Molecules
time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...
- Codeforces 344B Simple Molecules
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; scanf("%d%d%d", ...
- CodeForces Round 200 Div2
这次比赛出的题真是前所未有的水!只用了一小时零十分钟就过了前4道题,不过E题还是没有在比赛时做出来,今天上午我又把E题做了一遍,发现其实也很水.昨天晚上人品爆发,居然排到Rank 55,运气好的话没准 ...
- 我看的公开课系列--《TED:对无知的追求》 by stuart firestein
http://open.sina.com.cn/course/id_1047/ What scientists do is not just collect data and collect fact ...
随机推荐
- 自制单片机之七……扩展:DS18B20温度测量
DS18B20数字温度测量传感器,网上介绍很多,我就不罗嗦了.见图 DS18B20与前产品DS1820的不同: DS18B20继承了DS1820的全部优点,并做了如下改进 1.供电范围扩大为3.0-- ...
- 2015必须要看的APP源码
多媒体类型 哔哩哔哩(bilibili)客户端源码 一个高仿哔哩哔哩(bilibili)客户端的开源项目,效果不错 下载地址: http://www.apkbus.com/forum.php?mod= ...
- netstat命令, netstat指令在windows和linux有什么不同
查看当前tcp监听端口[op@TIM html]$ netstat -nltp(Not all processes could be identified, non-owned process inf ...
- Android AutoCompleteTextView和MultiAutoCompleteTextView使用
Android AutoCompleteTextView和MultiAutoCompleteTextView的功能类似于百度或者Google在搜索栏输入信息的时候,弹出的与输入信息接近的提示信息: 它 ...
- VMware vSphere 5.5的12个更新亮点(2)
ACPI支持 以前版本的VMware虚拟机的局限性之一,是支持的虚拟设备数量甚少.vSphere 5.5引入了Virtual Hardware 10,这增加了基于SATA的虚拟设备节点,通过AHCI( ...
- iptables 实现centos内网机器访问外网
环境:一台带外网和内网的机器,另一台只有内网,默认不能上网.两台机器都是centos系统带外网机器的外网ip为 123.221.20.11, 内网ip为 192.168.15.100内网机器的内网ip ...
- SQL中@@ROWCOUNT函数
返回受上一语句影响的行数.如果行数大于 20 亿,请使用 ROWCOUNT_BIG. 语法 @@ROWCOUNT 返回类型 int 注释 Transact-SQL 语句可以通过下列方 ...
- (转)window.location.search的用法
location.search是从当前URL的?号开始的字符串如:http://www.51js.com/viewthread.php?tid=22720它的search就是?tid=22720 通过 ...
- call()与apply()传参需要注意的一点
call()与apply()是用来改变函数体内的this指向,第一个参数是调用函数的母对象,他是调用上下文,函数体内通过this来获得对它的引用,换句话说就是第一参数===函数中的this. 但是如下 ...
- POJ - 2653 - Pick-up sticks 线段与线段相交
判断线段与线段相交 莫名其妙的数据量 #include <iostream> #include <cstdio> #include <vector> #includ ...