We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e59463 commit 21a3b2bCopy full SHA for 21a3b2b
verifying_test/AOJ/1227/trace.test.cpp
@@ -43,13 +43,20 @@ int solve_testcases() {
43
}
44
};
45
go(go, 0, -1);
46
+ vector<string> answers;
47
for(int id : terminals) {
48
vector<string> words = trace.get(id);
49
+ string answer = "";
50
for(int i=0; i<(int)words.size(); i++) {
- cout << words[i];
- if (i + 1 < (int)words.size()) cout << " ";
51
- else cout << ".\n";
+ answer += words[i];
52
+ if (i + 1 < (int)words.size()) answer += " ";
53
+ else answer += ".";
54
55
+ answers.emplace_back(answer);
56
+ }
57
+ sort(answers.begin(), answers.end());
58
+ for(auto answer : answers) {
59
+ cout << answer << endl;
60
61
cout << "--" << endl;
62
return 0;
0 commit comments