結果
| 問題 | 
                            No.118 門松列(2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-02-01 11:54:32 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 975 bytes | 
| コンパイル時間 | 489 ms | 
| コンパイル使用メモリ | 62,732 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-21 20:09:13 | 
| 合計ジャッジ時間 | 1,574 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 25 WA * 1 | 
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <array>
using namespace std;
template<class T> bool maxPointer(T& a, T b) { if (a < b) {a = b;return true;}return false;}
template<class T> int maxReturn(T a, T b) {if (a > b) {return a;} else {return b;}}
template<class T> bool minPointer(T& a, T b) {if (a < b) {a = b;return true;}return false;}
const long mod = 1000000007;
bool matuCheck(int a[], int i) {
	if ((a[i] > a[i-1] && a[i] > a[i+1]) || (a[i] < a[i-1] && a[i] < a[i+1])) {
		if (a[i] != a[i-1] && a[i] != a[i+1] && a[i-1] != a[i+1]) {return true;}
	}
	
	return false;
}
int main(void){
    int N;
    cin >> N;
    int matu[N];
    int cnt[101] = {0};
    long long res = 0;
    
    for (int i = 0; i < N; i++) {
        cin >> matu[i];
        ++cnt[matu[i]];
    }
    for(int a = 0; a < 101; a++) for (int j = a+1; j < 101; j++) for (int s = j+1; s < 101; s++) res += (long long)(cnt[a] * cnt[j] * cnt[s]);
    cout << res % mod << endl;
}