結果

問題 No.2517 Right Triangles on Circle
ユーザー maeshunmaeshun
提出日時 2023-10-28 13:21:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 443 ms / 2,000 ms
コード長 853 bytes
コンパイル時間 4,071 ms
コンパイル使用メモリ 235,412 KB
実行使用メモリ 22,416 KB
最終ジャッジ日時 2023-10-28 13:21:21
合計ジャッジ時間 10,652 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 432 ms
22,416 KB
testcase_14 AC 347 ms
22,416 KB
testcase_15 AC 430 ms
22,416 KB
testcase_16 AC 443 ms
22,416 KB
testcase_17 AC 314 ms
19,012 KB
testcase_18 AC 293 ms
17,980 KB
testcase_19 AC 247 ms
16,368 KB
testcase_20 AC 297 ms
16,516 KB
testcase_21 AC 401 ms
22,268 KB
testcase_22 AC 74 ms
8,772 KB
testcase_23 AC 285 ms
17,168 KB
testcase_24 AC 112 ms
9,972 KB
testcase_25 AC 61 ms
7,980 KB
testcase_26 AC 370 ms
19,468 KB
testcase_27 AC 68 ms
8,448 KB
testcase_28 AC 37 ms
6,332 KB
testcase_29 AC 105 ms
9,688 KB
testcase_30 AC 55 ms
7,304 KB
testcase_31 AC 279 ms
17,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define rep(i, n) for(int i=0;i<(n);++i)
#define rep1(i, n) for(int i=1;i<=(n);i++)
#define ll long long
using mint = modint998244353;
using P = pair<ll,ll>;
using lb = long double;
using T = tuple<ll, ll, ll>;
#ifdef LOCAL
#  include <debug_print.hpp>
#  define dbg(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#  define dbg(...) (static_cast<void>(0))
#endif

int main()
{
    int n, m;
    cin >> n >> m;
    map<int, ll> mp;
    rep(i,n){
        int a;
        cin >> a;
        mp[a]++;
    }
    if(m%2==1){
        cout << 0 << endl;
        return 0;
    }
    ll ans = 0;
    for(auto p : mp){
        if(mp.count(p.first+m/2)){
            ans += n-2;
        }
        dbg(p.first);
    }
    cout << ans << endl;
    return 0;
}
0