http://codeforces.com/contest/344/problem/B

  1. #include <cstdio>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a,b,c;
  8. int t1=,t2=,t3=;
  9. while(scanf("%d%d%d",&a,&b,&c)!=EOF)
  10. {
  11. bool flag=false;
  12. for(int i=; i<=a; i++)
  13. {
  14. t1=i;
  15. if(b-i>=)
  16. {
  17. t2=b-i;
  18. if(c-(b-i)==a-i)
  19. {
  20. flag=true;
  21. t3=c-(b-i);
  22. break;
  23. }
  24. }
  25. }
  26. if(flag)
  27. printf("%d %d %d\n",t1,t2,t3);
  28. else
  29. printf("Impossible\n");
  30. }
  31. return ;
  32. }

cf B. Simple Molecules的更多相关文章

  1. Simple Molecules(简单)

    Simple Molecules time limit per test 1 second memory limit per test 256 megabytes input standard inp ...

  2. CodeForces - 344B Simple Molecules (模拟题)

    CodeForces - 344B id=46665" style="color:blue; text-decoration:none">Simple Molecu ...

  3. codeforces Simple Molecules

    link:http://codeforces.com/contest/344/problem/B 刚开始想复杂了.一开始就想当然地以为可以有多个点,其实,人家题目要求只有3个点啊! 然后题目就简单了. ...

  4. codeforces B. Simple Molecules 解题报告

    题目链接:http://codeforces.com/problemset/problem/344/B 题目意思:这句话是解题的关键: The number of bonds of an atom i ...

  5. cf A Simple Task---线段树

    Examples Input 10 5abacdabcda7 10 05 8 11 4 03 6 07 10 1 Output cbcaaaabdd Input 10 1agjucbvdfk1 10 ...

  6. B. Simple Molecules

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  7. Codeforces 344B Simple Molecules

    #include<bits/stdc++.h> using namespace std; int main() { int a,b,c; scanf("%d%d%d", ...

  8. CodeForces Round 200 Div2

    这次比赛出的题真是前所未有的水!只用了一小时零十分钟就过了前4道题,不过E题还是没有在比赛时做出来,今天上午我又把E题做了一遍,发现其实也很水.昨天晚上人品爆发,居然排到Rank 55,运气好的话没准 ...

  9. 我看的公开课系列--《TED:对无知的追求》 by stuart firestein

    http://open.sina.com.cn/course/id_1047/ What scientists do is not just collect data and collect fact ...

随机推荐

  1. 智能卡安全机制比较系列(三) MPCOS

    MPCOS是金普斯早期推出的一款多应用支付芯片卡操作系统,支持ISO7816以及PCOS的数据格式和命令.MPCOS具有两级目录文件结构,即MF下可以有一级DF,每个DF下最多可创建63个EF. MP ...

  2. Qt编程之对QGraphicsItem点击右键弹出菜单

    就是对这个contextMenuEvent 事件重新实现,在这个事件函数中创建菜单,大概就是这样. void MyItem::contextMenuEvent(QGraphicsSceneContex ...

  3. spring注解方式 idea报could not autowire,eclipse却没有问题

    解决办法1: 从根本上解决: File-Project Structure 页面 Facets下删掉 Spring(直接右键Delete) 这个解答是对的.并不会降低安全性!!因为创建项目的时候,都是 ...

  4. JAVA常用类库简介(转)

    Java编程语言中为方便学习者学习,编制了许多类,这些类已经经过测试,都是我们编程的基础.如果不利用这些已存在的类,我们的编程工作将变得异常复杂并且效率低下.所以我们应尽可能多的掌握Java基本类库的 ...

  5. 【转】Windows 7下硬盘安装Ubuntu 14.04图文教程--不错

    原文网址:http://www.linuxidc.com/Linux/2014-04/100369p3.htm Ubuntu 官方已经发布了正式版的 Ubuntu 14.04 LTS,并宣称这是为云计 ...

  6. android Handler及消息处理机制的简单介绍

    学习android线程时,直接在UI线程中使用子线程来更新TextView显示的内容,会有如下错误:android.view.ViewRoot$CalledFromWrongThreadExcepti ...

  7. C#实现目录复制

     摘自:http://www.cnblogs.com/zxjay/archive/2008/10/29/1322517.html FCL提供了文件移动.文件复制.目录移动的方法,但没提供目录复制的 ...

  8. HDU 3586 : Information Disturbing

    Problem Description In the battlefield , an effective way to defeat enemies is to break their commun ...

  9. python scrapy 基础

    scrapy是用python写的一个库,使用它可以方便的抓取网页. 主页地址http://scrapy.org/ 文档 http://doc.scrapy.org/en/latest/index.ht ...

  10. Android开发(20)--RadioGroup的使用

    RadioGroup 有时候比較实用.主要特征是给用户提供多选一机制. MainActivity.java package com.example.lesson16_radio; import and ...