Submission #00046
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s[n]; vector<string> gousuper, other; for ( int i = 0; i < n; i++) { cin >> s[i]; if (s[i].find( "gou" ) == -1 && s[i].find( "super" ) == -1) { other.push_back(s[i]); } else { gousuper.push_back(s[i]); } } sort(gousuper.rbegin(), gousuper.rend()); sort(other.begin(), other.end()); for ( int i = 0; i < gousuper.size(); i++) { cout << gousuper[i] << "\n" ; } for ( int i = 0; i < other.size(); i++) { cout << other[i] << "\n" ; } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0017 - GouSorter |
ユーザー名 | woody_1227 |
投稿日時 | 2023-11-13 09:24:18 |
言語 | C++17 |
状態 | Accepted |
得点 | 50 |
ソースコード長 | 666 Byte |
最大実行時間 | 25 ms |
最大メモリ使用量 | 652 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 50 / 50 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in-01.txt | AC | 25 ms | 604 KB |
1
|
in-02.txt | AC | 19 ms | 580 KB |
1
|
in-03.txt | AC | 16 ms | 424 KB |
1
|
in-04.txt | AC | 17 ms | 524 KB |
1
|
in-05.txt | AC | 18 ms | 616 KB |
1
|
in-06.txt | AC | 19 ms | 556 KB |
1
|
in-07.txt | AC | 21 ms | 652 KB |
1
|
in-08.txt | AC | 20 ms | 596 KB |
1
|
in-09.txt | AC | 16 ms | 568 KB |
1
|
in-10.txt | AC | 17 ms | 532 KB |
1
|