codeforce 600A - Extract Numbers】的更多相关文章

学习string #include <bits/stdc++.h> #define eps 1e-8 #define M_PI 3.141592653589793 ; using namespace std; string st; vector<string>v1,v2; bool judge(string str) { ) return false; ; i<str.size(); i++) { ') return false; } &&str[]==')…
A. Extract Numbers time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output You are given string s. Let's call word any largest sequence of consecutive symbols without symbols ',' (comma) and '…
模拟题,意思是一个字符串,单词直接用','或';'来分割,可以为空,把不含前导0的整数和其他单词分别放入A和B.按照一定格式输出. 没有用stl的习惯.维护两个下标i,j,表示开区间(i,j),两段补上分割符号.每个单词后面都加上一个',',输出的时候在处理掉. 用最后的','判断A和B是不是空. #include<bits/stdc++.h> using namespace std; typedef long long ll; ; char s[LEN]; char a[LEN]; char…
A. Extract Numbers Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/600/problem/A Description You are given string s. Let's call word any largest sequence of consecutive symbols without symbols ',' (comma) and ';' (semicolon…
Extract Numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given string s. Let's call word any largest sequence of consecutive symbols without symbols ',' (comma) and ';' (sem…
A. Numbers time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output Little Petya likes numbers a lot. He found that number 123 in base 16 consists of two digits: the first is 7 and the second is 11.…
打开题目链接 题意:输入一个字符串,用,或:分隔输出字符串和整数(不含前导0和浮点数) ACcode: #include <iostream> #include <cstdio> #include <cstring> using namespace std; string s,digit,seq,temp; int main() { cin>>s; for(int i=0; i<s.length(); i++) if(s[i] == ',' || s[…
600A - Extract Numbers    20171106 字符串处理题,稍微注意点细节就能水过 #include<stdlib.h> #include<stdio.h> #include<math.h> #include<vector> #include<cstring> #include<iostream> #include<algorithm> using namespace std; string s;i…
C. Phone Numbers time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output And where the are the phone numbers? You are given a string s consisting of lowercase English letters and an integer k. Find th…
One beautiful July morning a terrible thing happened in Mainframe: a mean virus Megabyte somehow got access to the memory of his not less mean sister Hexadecimal. He loaded there a huge amount of n different natural numbers from 1 to n to obtain tota…