Zero-complexity Transposition
Zero-complexity Transposition
https://www.nowcoder.com/practice/c54775799f634c72b447ef31eb36e975
#include <iostream> #include <stack> #include <cstdio> using namespace std; //大数要用lld int main() { int n; stack<long long> stack; scanf("%d", &n); for(int i = 0; i < n; i++){ long long num; scanf("%lld", &num); stack.push(num); } for(int i = 0; i < n; i++){ printf("%lld ", stack.top()); stack.pop(); } } // 64 位输出请用 printf("%lld")