题解 | #编排字符串#

编排字符串

https://www.nowcoder.com/practice/42c0673f04b34f66ae236a1cb7995532

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n;cin>>n;
    vector<string>v;
    while(n--){
        int k=1;
        string temp;
        cin>>temp;
        v.push_back(temp);
        for(auto a = v.rbegin();a!=v.rend();a++)
            if(k<5)
                cout<<k++<<"="<<*a<<" ";
        cout<<endl;
    }
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

完美的潜伏者许愿简历...:隐藏信息被你提取出来了,暗示,这就是暗示
点赞 评论 收藏
分享
Java抽象带篮子:简历怎么写可以看看我发的帖子,你的第一个是实习经历吗?那怎么写的是你的第一个练手项目呢?简历写的怎么样直接投小厂面试一下就知道了
没有实习经历,还有机会进...
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务