結果
問題 |
No.118 門松列(2)
|
ユーザー |
![]() |
提出日時 | 2015-08-01 01:16:23 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 464 ms |
コンパイル使用メモリ | 55,764 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-18 00:17:05 |
合計ジャッジ時間 | 1,957 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 21 |
ソースコード
#include<iostream> using namespace std; typedef long long LL; #define rep(i,s,n) for(int i=(s); i<(n);++i) const int mod = 1e9 + 7; const int N = 101; int a[N]; int main() { int n; cin >> n; rep(i, 0, n){ int t; cin >> t; a[t]++; } LL ans = 0; rep(i, 0, N) rep(j, i + 1, N) rep(k, j + 1, N) { ans += ((LL)a[i] * a[j] % mod*a[k]) % mod; } cout << ans << endl; return 0; }