339A
#include <iostream> #include <string> #include <algorithm> using namespace std; #define maxSize 105 int main() { string exp; int digit[maxSize]; int length,index; while(cin>>exp) { length=exp.size(); index=0; for(int i=0; i<length; i+=2) digit[index++]=exp[i]-'0'; sort(digit,digit+index); cout<<digit[0]; if(index>1) { for(int i=1; i<index; ++i) cout<<'+'<<digit[i]; } cout<<endl; } return 0; }
339A的更多相关文章
- [ An Ac a Day ^_^ ] CodeForces 339A Helpful Maths
熄灯了才想起来没写博客 赶紧水一道题碎觉…… #include<stdio.h> #include<iostream> #include<algorithm> #i ...
- codeforces 339A.Helpful Maths B.Xenia and Ringroad 两水题
A.题意就是把字符串里面的数字按增序排列,直接上代码. #include <string.h> #include <stdio.h> #include <algorith ...
- MVC4 WebAPI
不管是因为什么原因,结果是在新出的MVC中,增加了WebAPI,用于提供REST风格的WebService,个人比较喜欢REST风格的WebService,感觉比SOAP要轻量级一些,而且对客户端的要 ...
- MVC4 WebAPI(一)
http://www.cnblogs.com/wk1234/archive/2012/04/28/2468491.html 不管是因为什么原因,结果是在新出的MVC中,增加了WebAPI,用于提供RE ...
- OAF_OAF控件系列3 - AdvancedTable的实现(案例)
2014-06-02 Created By BaoXinjian
- MVC4 WebAPI(一)(转)
出处:http://www.cnblogs.com/wk1234/archive/2012/04/28/2468491.html 不管是因为什么原因,结果是在新出的MVC中,增加了WebAPI,用于提 ...
随机推荐
- Mybatis 的 xml 文件语法错误,启动项目时控制台一直循环解析但是不打印错误
重写SqlSessionFactoryBean的buildSqlSessionFactory方法: eg: package com.slp; import java.io.IOException; i ...
- Windows-NTFS-ADS在渗透测试中的利用
0.什么是ADS Windows:微软公司的一款视窗操作系统,其内核为WindowsNT. NTFS:WindowsNT环境的限制级专用文件系统. ADS:NTFS的系统特性,交换数据流(Altern ...
- linux 下开源代理路由工具
服务器搭建,参考 https://gfw.press/blog/?p=21 运行环境 openjdk1.8,linux 1.首先,获取工具地址 git clone https://github.com ...
- Linux内核编译指定输出目录
# kbuild supports saving output files in a separate directory.# To locate output files in a separate ...
- MySQL之视图、触发器、事务、存储过程、函数 流程控制
MySQL之视图.触发器.事务.存储过程.函数 阅读目录 一 视图 二 触发器 三 事务 四 存储过程 五 函数 六 流程控制 MySQL这个软件想将数据处理的所有事情,能够在mysql这个层面上全部 ...
- tensorflow如何正确加载预训练词向量
使用预训练词向量和随机初始化词向量的差异还是挺大的,现在说一说我使用预训练词向量的流程. 一.构建本语料的词汇表,作为我的基础词汇 二.遍历该词汇表,从预训练词向量中提取出该词对应的词向量 三.初始化 ...
- iOS10原生的语音转文字功能
#import <Foundation/Foundation.h> #import <Speech/Speech.h> @interface SpeechListener : ...
- field, or, more generally, in a ring or even a semiring 数域、环、半环
小结: 1.数域.环.半环 :一般化.泛化 https://en.wikipedia.org/wiki/Matrix_multiplication In mathematics, matrix mul ...
- 深探树形dp
看到同学在写一道树形dp,好奇直接拿来写,发现很不简单. 如图,看上去是不是很像选课,没错这不是选课,升级版吧,多加了点东西罢了.简单却调了一晚上和一上午. 思路:很简单强联通分量+缩点+树形dp.直 ...
- LeetCode 784 Letter Case Permutation 解题报告
题目要求 Given a string S, we can transform every letter individually to be lowercase or uppercase to cr ...