题解 | #编排字符串#
编排字符串
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")