結果
問題 | No.118 門松列(2) |
ユーザー |
|
提出日時 | 2022-04-18 20:49:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 428 bytes |
コンパイル時間 | 1,970 ms |
コンパイル使用メモリ | 166,784 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 23:25:09 |
合計ジャッジ時間 | 3,782 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 WA * 1 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n,x; cin >> n; vector<int> 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'; }