Skip to content

Commit 21a3b2b

Browse files
committed
fix to pass tests
1 parent 1e59463 commit 21a3b2b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

verifying_test/AOJ/1227/trace.test.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,20 @@ int solve_testcases() {
4343
}
4444
};
4545
go(go, 0, -1);
46+
vector<string> answers;
4647
for(int id : terminals) {
4748
vector<string> words = trace.get(id);
49+
string answer = "";
4850
for(int i=0; i<(int)words.size(); i++) {
49-
cout << words[i];
50-
if (i + 1 < (int)words.size()) cout << " ";
51-
else cout << ".\n";
51+
answer += words[i];
52+
if (i + 1 < (int)words.size()) answer += " ";
53+
else answer += ".";
5254
}
55+
answers.emplace_back(answer);
56+
}
57+
sort(answers.begin(), answers.end());
58+
for(auto answer : answers) {
59+
cout << answer << endl;
5360
}
5461
cout << "--" << endl;
5562
return 0;

0 commit comments

Comments
 (0)