题解 | KY109
Zero-complexity Transposition
https://www.nowcoder.com/practice/c54775799f634c72b447ef31eb36e975?tpId=40&tqId=21440&rp=1&ru=/ta/kaoyan&qru=/ta/kaoyan&difficulty=2&judgeStatus=3&tags=/question-ranking
#include <iostream> using namespace std; #define N 10000 struct s{ string str; }; int main(){ int n; while(cin >>n){ int i; struct s st[N]; for (i = 0; i <n;i++){ cin >> st[i].str; } for (i = n-1; i >=0;i--){ cout <<st[i].str<<" "; } } }