2018 ccpc final
2018 CCPC FINAL kunkun全球后援队训练赛赛 A. 签到 笨比mwh wa了两发 #include <stdio.h> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #pragma GCC optimize(2) using namespace std; typedef long long ll; const int N = 1e5 + 5; int t, n, m, kas; struct node{ int d, t; }list[N]; bool cmp(node a, node b){ if (a.d == b.d) return a.t < b.t; return a.d < b.d; } int main() { // cin.tie(0); // cout.tie(0); // ios::sync_with_stdio(0); cin >> t; kas = 0; while (t--) { cin >> n >> m; for (int i = 0; i < n; ++i) cin >> list[i].d; for (int i = 0; i < n; ++i) cin >> list[i].t; sort(list, list + n,