熄灯了才想起来没写博客 赶紧水一道题碎觉……

 #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<math.h>
#include<string.h>
#include<string>
#include<map>
#include<set>
#include<vector>
#include<queue>
#define M(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef long long ll;
int num[];
int main(){
int a,i=;
char st;
while(true){
scanf("%d%c",&a,&st);
num[i++]=a;
if(st=='\n') break;
}
sort(num,num+i);
for(int j=;j<i-;j++)
printf("%d+",num[j]);
printf("%d\n",num[i-]);
return ;
}
/* 3+2+1 1+1+3+1+3 2 */

[ An Ac a Day ^_^ ] CodeForces 339A Helpful Maths的更多相关文章

  1. codeforces 339A.Helpful Maths B.Xenia and Ringroad 两水题

    A.题意就是把字符串里面的数字按增序排列,直接上代码. #include <string.h> #include <stdio.h> #include <algorith ...

  2. Codeforces Round #197 (Div. 2) A. Helpful Maths【字符串/给一个连加计算式,只包含数字 1、2、3,要求重新排序,使得连加的数字从小到大】

    A. Helpful Maths time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  3. Codeforces Helpful Maths

    Xenia the beginner mathematician is a third year student at elementary school. She is now learning t ...

  4. codeforces水题100道 第二十五题 Codeforces Round #197 A. Helpful Maths (Div. 2) (strings)

    题目链接:http://www.codeforces.com/problemset/problem/339/A题意:重新组合加法字符串,使得按照1,2,3的顺序进行排列.C++代码: #include ...

  5. B - Helpful Maths

    Problem description Xenia the beginner mathematician is a third year student at elementary school. S ...

  6. Codeforces Round #197 (Div. 2) (A、B、C、D、E五题合集)

    A. Helpful Maths 题目大意 给一个连加计算式,只包含数字 1.2.3,要求重新排序,使得连加的数字从小到大 做法分析 把所有的数字记录下来,从小到大排序输出即可 参考代码 #inclu ...

  7. CodeForces Round 197 Div2

    这次出的题水爆了,借着这个机会终于把CF的号变蓝了.A. Helpful Mathstime limit per test2 secondsmemory limit per test256 megab ...

  8. Codeforces Round #197 (Div. 2)

    A.Helpful Maths 分析:将读入的字符转化为数字,直接排个序就可以了. #include <cstdlib> #include <cstring> #include ...

  9. 欢迎来到 Flask 的世界

    欢迎来到 Flask 的世界 欢迎阅读 Flask 的文档.本文档分成几个部分,我推荐您先读 < 安装 >,然后读< 快速上手 >.< 教程 > 比快速上手文档更详 ...

随机推荐

  1. CentOS 手动增加、删除swap区

    SWAP是Linux中的虚拟内存,用于扩充物理内存不足而用来存储临时数据存在的.它类似于Windows中的虚拟内存.在Windows中,只可以使用文件来当作虚拟内存.而linux可以文件或者分区来当作 ...

  2. wpf 线程与界面线程

    Thread thread = new Thread(new ThreadStart(() =>        {            VisualTarget visualTarget =  ...

  3. 2016 ACM/ICPC Asia Regional Qingdao Online

    吐槽: 群O的不是很舒服 不知道自己应该干嘛 怎样才能在团队中充分发挥自己价值 一点都不想写题 理想中的情况是想题丢给别人写 但明显滞后 一道题拖沓很久 中途出岔子又返回来搞 最放心的是微软微软妹可以 ...

  4. Linq——Count、Sum、Min、Max、Average

    using System; using System.Data; using System.Configuration; using System.Linq; using System.Web; us ...

  5. redis整合spring

    最近公司项目有用到     所以找了一下实例.感觉很清晰.    完整项目路径http://www.cnblogs.com/dennisit/p/3614521.html看了一下应该没问题

  6. 字符串---分割成数组(str_split ),算出一个字符串中出现最多的字符, 学校中最多的姓名

    split 分割separate分开 little 小的 echo '<meta http-equiv="Content-type" content="text/h ...

  7. 移动app安全测试

    安全方面逐渐转向app安全,服务端app安全测试基本上跟常规的web方面挖掘差不多,只是增加了一个反编译或抓包的过程. 参考文献: http://drops.wooyun.org/tips/749 h ...

  8. 前端自动化部署之gulp

    1.首先需要安装node+npm(这里不再叙述,网上教程一大堆) 2.gulp全局安装:npm install -g gulp 3.cd进入到你的项目目录,这里使用demo文件夹为我的示例项目 4.在 ...

  9. Java版冒泡排序和选择排序

    一.理解说明 1.理解和记忆 冒泡排序:依次定位数组元素,每次只和相邻的且符合条件的元素交换位置. 选择排序:依次在数组的每个位置,通过逐个对比选择出最大或最小的元素. 2.知识点说明 (1)数组是引 ...

  10. 安装arcgis server完成,打开出现未关联错误怎么办

    在控制面板,默认程序-将文件类型或协议与程序关联-找到URL(manager右键属性)后缀名的文件双击,选择explorer即可