ascll码
- ‘0’ 的ASCLL码为48
- ‘a ’的ASCLL码为97
- ’A’ 的ASCLL码为65
- 大小写字母的转换 ‘a’ -‘A’ = 32
ACM模式的输入输出
ACM模式C++输入输出
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<algorithm>
#include<limits.h>
using namespace std;
int main(){
int n=0;
while(cin>n){
cout<<n<<endl;
}
string s;
while(cin>>s){
cout<<s<<endl;
}
char c;
while(cin>>c){
cout<<c<<endl;
}
while(cin.get(c)){
cout<<c<<endl;
}
while(getchar()){
cout<<c<<endl;
}
int n=0;
while(cin>>n){
vector<string> vec;
for(int i=0;i<n;i++){
string s;
cin>>s;
vec.push_back(s);
}
}
int i;
while(cin>>i){
while(getchar()!='\n'){
int num;
cin>>num;
}
}
vector<string> vec;
string s;
while(cin>>s){
vec.push_back(s);
if(getchar()=='\n'){
}
vec.clear();
}
string s;
while(getline(cin,s)){
stringstream data(s);
int num;
while(data>>num){
}
}
return 0;
}
void Stringsplit(string str,const const char split)
{
istringstream iss(str);
string token;
while (getline(iss, token, split))
{
cout << token << endl;
}
}