文章

28

粉丝

0

获赞

278

访问

23.4k

头像
句子正序 题解:一直插入到头部就可以AC
P1004 兰州大学机试题题
发布于 2026年2月
阅读数 730

#include<iostream>
#include<vector>
#include<string>
using namespace std;

int main() {
    vector<string> str;
    string temp;
    while(cin >> temp)
        str.insert(str.begin(),temp);    
    for(auto ele : str) cout << ele << ' ';
    return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发