Submission #66630
ソースコード
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 27 28 29 30 31 | #include <iostream> #include <vector> using namespace std; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio( false ); int n; cin >> n; vector< int > cnt(1e5); for ( int i = 0; i < n; ++i){ int a; cin >> a; cnt[a - 1]++; } long long res = 1; for ( int i = 0; i < 1e5; ++i){ res *= cnt[i] + 1; res %= 998244353; } cout << res - 1 << '\n' ; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 1509 - Increasing Sequence |
ユーザー名 | ei1903 |
投稿日時 | 2021-05-12 15:42:56 |
言語 | C++17 |
状態 | Accepted |
得点 | 2 |
ソースコード長 | 476 Byte |
最大実行時間 | 33 ms |
最大メモリ使用量 | 1144 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 2 / 2 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 26 ms | 984 KB |
1
|
in02.txt | AC | 26 ms | 804 KB |
1
|
in03.txt | AC | 19 ms | 880 KB |
1
|
in04.txt | AC | 33 ms | 824 KB |
1
|
in05.txt | AC | 28 ms | 768 KB |
1
|
in06.txt | AC | 26 ms | 844 KB |
1
|
in07.txt | AC | 22 ms | 908 KB |
1
|
in08.txt | AC | 30 ms | 980 KB |
1
|
in09.txt | AC | 24 ms | 1052 KB |
1
|
in10.txt | AC | 25 ms | 996 KB |
1
|
in11.txt | AC | 26 ms | 1072 KB |
1
|
in12.txt | AC | 25 ms | 1012 KB |
1
|
in13.txt | AC | 29 ms | 960 KB |
1
|
in14.txt | AC | 32 ms | 904 KB |
1
|
in15.txt | AC | 24 ms | 980 KB |
1
|
in16.txt | AC | 23 ms | 924 KB |
1
|
in17.txt | AC | 26 ms | 872 KB |
1
|
in18.txt | AC | 25 ms | 948 KB |
1
|
in19.txt | AC | 16 ms | 888 KB |
1
|
in20.txt | AC | 22 ms | 836 KB |
1
|
in21.txt | AC | 26 ms | 1044 KB |
1
|
in22.txt | AC | 20 ms | 992 KB |
1
|
sample01.txt | AC | 20 ms | 1068 KB |
1
|
sample02.txt | AC | 23 ms | 1144 KB |
1
|