結果
問題 | No.118 門松列(2) |
ユーザー |
|
提出日時 | 2022-04-18 20:50:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 21 ms / 5,000 ms |
コード長 | 434 bytes |
コンパイル時間 | 1,787 ms |
コンパイル使用メモリ | 168,880 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 23:26:14 |
合計ジャッジ時間 | 3,203 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n,x; cin >> n; vector<long long> t(100); for(int i = 0; i < n; i++){ cin >> x; t[--x]++; } long long ans = 0; for(int i = 0; i < 100; i++){ for(int j = 0; j < i; j++){ for(int k = 0; k < j; k++){ ans += t[i] * t[j] * t[k]; } } } cout << ans % 1000000007 << '\n'; }