結果

問題 No.1390 Get together
ユーザー kenken714kenken714
提出日時 2021-02-12 23:38:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 760 bytes
コンパイル時間 1,833 ms
コンパイル使用メモリ 183,892 KB
実行使用メモリ 25,548 KB
最終ジャッジ日時 2023-09-27 07:19:59
合計ジャッジ時間 6,797 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
13,120 KB
testcase_01 AC 7 ms
13,168 KB
testcase_02 AC 7 ms
13,124 KB
testcase_03 AC 9 ms
13,420 KB
testcase_04 AC 9 ms
13,380 KB
testcase_05 WA -
testcase_06 AC 10 ms
13,368 KB
testcase_07 WA -
testcase_08 AC 9 ms
13,300 KB
testcase_09 AC 11 ms
13,520 KB
testcase_10 AC 8 ms
13,180 KB
testcase_11 AC 7 ms
13,120 KB
testcase_12 AC 7 ms
13,208 KB
testcase_13 WA -
testcase_14 AC 7 ms
13,220 KB
testcase_15 AC 7 ms
13,200 KB
testcase_16 AC 195 ms
21,852 KB
testcase_17 AC 158 ms
21,764 KB
testcase_18 AC 227 ms
25,300 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 181 ms
25,208 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 182 ms
25,280 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define FORR(i, m, n) for (ll i = m; i >= n; i--)
#define REPO(i, n) for (ll i = 1; i <= n; i++)
#define ll long long
#define INF (ll)1 << 60
#define MINF (-1 * INF)
#define ALL(n) n.begin(), n.end()
#define MOD 1000000007
#define P pair<ll, ll>


ll n, m, ans;

set<ll> s[210000];
int main(){
    cin >> n >> m;
	vector<ll> b(n), c(n);
	REP(i, n){
        cin >> b[i] >> c[i];
        s[c[i]].insert(b[i]);
    }
	REP(i, 210000){
        ans += max(0, (int)s[i].size() - 1);
    }
    cout << ans << endl;
}
0