# ZeroJudge - d634: 魔法卡magic ### 題目連結:https://zerojudge.tw/ShowProblem?problemid=d634 ###### tags: `ZeroJudge` `字串` `排序(Sorting)` ```cpp= #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { cin.sync_with_stdio(false); cin.tie(nullptr); static string casts[100000]; int amount; cin >> amount; getline(cin, casts[0]); for (int i = 0; i < amount; ++i) getline(cin, casts[i]); sort(casts, casts + amount); for (int i = 0; i < amount; ++i) cout << casts[i] << '\n'; } ```