ICode9

精准搜索请尝试: 精确搜索
  • Codeforces Round #805 (Div. 3)2022-07-28 14:31:38

    C. Train and Queries 思路: 开一个map记录一个数字出现的最小坐标和最大坐标 #include <bits/stdc++.h> using namespace std; typedef pair<int, int> PII; const int N = 200010; int n, k; PII a[N]; int main() { int T; cin >> T; while(T -- ) {

  • Codeforces Round #805 (Div. 3) A - G2022-07-13 20:01:31

    传送门 第一次赛中 AK div3,值得纪念! 赛后发现有很多题想的不是很周到,所以晚发了这么久 A - Round Down the Price 找到一个不大于当前数字的 10 的次幂 #include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <string> #include <queue> #inclu

  • Codeforces Round #805 (Div. 3)(A~F,G待更)2022-07-12 00:12:36

    A B C D E F G + + +2 + + + -2 A 签到题不讲。 B 模拟题,每次要记录到的字母超过3个时就加一天。 时间复杂度\(\mathcal{O}(\sum|S|)\) C 不难发现要把\(u\)先离散化一波,设车站\(x\)所处最靠前的位置为\(Min_x\),最靠后的为\(Max_x\),每次询问\(a_i,b_i\)时,若\(Min_{a_i}

  • Codeforces Round #805 (Div. 3)2022-07-11 16:06:35

    比赛链接: https://codeforces.com/contest/1702 E. Split Into Two Sets 题意: \(n\)(\(n\) 为偶数)张多米诺骨牌,每张骨牌有两个数字(数字范围为 1 到 \(n\)),问是否能将所有的骨牌分成两堆,每堆中的数字没有重复。 思路: 容易知道最后划分出来的两堆骨牌覆盖了 1 到 \(n\) 的所有数字,即每

  • Codeforces Round #805 (Div. 3)2022-07-11 02:01:47

    咕咕咕咕。 E. Split Into Two Sets 题意 有\(n\)张牌,每张牌上写有两个数字,问是否能将牌分成两个集合,使得单个集合中的牌上的数字构成的集合没有重复元素。 其中\(2 \le n \le 2 \times{10}^5\)。 思路 转化成图论问题,令每个数字对应一个节点,问题从将牌分成两个集合转换成将数

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有