結果

問題 No.118 門松列(2)
コンテスト
ユーザー tottoripaper
提出日時 2015-03-05 00:18:46
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 471 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 126 ms
コンパイル使用メモリ 40,848 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-03-10 07:40:49
合計ジャッジ時間 1,375 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <cstdio>

typedef long long ll;

const ll MOD = 1000000000ll + 7;

int c[101];

int main(){
    int N;
    scanf("%d", &N);

    for(int i=0;i<N;i++){
        int a;
        scanf("%d", &a);

        c[a]++;
    }

    ll res = 0ll;
    for(int i=1;i<=100;i++){
        for(int j=i+1;j<=100;j++){
            for(int k=j+1;k<=100;k++){
                res = res + c[i] % MOD * c[j] % MOD * c[k] % MOD;
            }
        }
    }

    printf("%lld\n", res);
}
0