結果
問題 |
No.118 門松列(2)
|
ユーザー |
👑 |
提出日時 | 2020-03-09 03:38:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 604 bytes |
コンパイル時間 | 626 ms |
コンパイル使用メモリ | 63,872 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 20:31:36 |
合計ジャッジ時間 | 2,236 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 26 |
ソースコード
#include <iostream> using namespace std; const int mod = 1000000007; long long A[100]; int main(){ int n;cin>>n; for(int i = 0; n > i; i++){ int t;cin>>t; A[--t]++; } long long ans = 0; for(int i = 0; 100 > i; i++){ if(!A[i])continue; for(int j = 0; 100 > j; j++){ if(i==j)continue; if(!A[j])continue; for(int k = 0; 100 > k; k++){ if(i==k||j==k)continue; if(!A[k])continue; ans = (ans+A[i]*A[j]*A[k])%mod; } } } cout << ans << endl; }