結果
| 問題 |
No.118 門松列(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-01 11:50:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 964 bytes |
| コンパイル時間 | 503 ms |
| コンパイル使用メモリ | 62,360 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-21 20:02:34 |
| 合計ジャッジ時間 | 1,680 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 22 |
ソースコード
#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};
int 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)(cnt[a] * cnt[j] * cnt[s]) % mod;
cout << res << endl;
}