#P339A. Helpful Maths Description Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. The teacher has written down the sum of multiple numb
Codeforces Round #197 (Div. 2) A. Helpful Maths bfsof 一只退役蒟蒻ACMer(考研备考) 来自专栏 · Codeforces题解 创作声明: 内容包含剧透 水题 #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll arr[1000],a=0; string s; cin>>s; for(ll i=0;i='0...
You've got the sum that was written on the board. Rearrange the summans and print the sum in such a way that Xenia can calculate the sum. Input The first line contains a non-empty strings— the sum Xenia needs to count. Stringscontains no spaces. It only contains digits and characters...
codeforces 339A.Helpful Maths B.Xenia and Ringroad 两水题 A.题意就是把字符串里面的数字按增序排列,直接上代码。 B.题意,有n个房子顺时针排成一圈,标号从1到n,只能顺时针走,要按次序到达规定的位置,从一个房子到旁边的房子需要1单位的时间,求总共要多长时间(注意要用64位整形)......
1. output 1+1+1+3+3 1. input 2 1. output 2 1. 这种题目由于keyword少,所以就能够转换为counting sort的思想去解决。这样时间效率就仅仅有O(n)了。 void HelpfulMaths() { int A[4] = {0}; int a; while (scanf("%d", &a) != EOF) ...
A.题意就是把字符串里面的数字按增序排列,直接上代码。 #include <string.h> #include <stdio.h> #include <algorithm> using namespace std; int main() { char s[1005]; int num[105]; while (scanf("%s" , s) != EOF) { int l = strlen(s); ...
codeforces 339A.Helpful Maths B.Xenia and Ringroad 两水题,A.题意就是把字符串里面的数字按增序排列,直接上代码。#include#include#includ
codeforces水题100道 第二十五题 Codeforces Round #197 A. Helpful Maths (Div. 2) (strings) 题目链接:http://www.codeforces.com/problemset/problem/339/A 题意:重新组合加法字符串,使得按照1,2,3的顺序进行排列。 C++代码: C++
[ An Ac a Day ^_^ ] CodeForces 339A Helpful Maths 熄灯了才想起来没写博客 赶紧水一道题碎觉…… 1#include<stdio.h>2#include<iostream>3#include<algorithm>4#include<math.h>5#include<string.h>6#include<string>7#include8#include<set>9#include<vector>10#include<queue>11#defineM(a,b) ...
Codeforces Round #197 (Div. 2) A. Helpful Maths【字符串/给一个连加计算式,只包含数字 1、2、3,要求重新排序,使得连加的数字从小到大】,A.HelpfulMathstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputXeniathebeginn