hiho week 107 register

Ended

Participants:535

Verdict:Accepted
Score:100 / 100
Submitted:2016-07-20 17:18:24

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<string>
#include <iostream>
#include <vector>
using namespace std;
int main(){
    vector<string> res;
    string word="";
    char c;
    while (cin>>noskipws>>c){
       if(isalpha(c)){
          if(c>='A'&&c<='Z')
              c +=32;
              word +=c;
           
       }
       else {
              if(word!=""){
                  res.push_back(word);
                  word="";
              }
              if(c!=' '){
                  string str;
                  if(c==44) str="44";
                  else if(c==46) str="46";
                  else if(c==10) str="10";
                  res.push_back(str);
                  
              }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX