ICode9

精准搜索请尝试: 精确搜索
  • 例题:位运算的累计2022-07-25 11:33:39

    https://atcoder.jp/contests/abc261/tasks/abc261_e https://atcoder.jp/contests/abc261/editorial/4490 思路是 f[i]=0或1,fun[i]=0或1 fun[0]表示前面的累计操作会把0变为什么数, fun[1]表示前面的累计操作会把1变为什么数。 f[0]表示当前操作会把0变为什么数, f[1]表示当前操作

  • AtCoder Beginner Contest 174 题解2021-10-16 23:03:38

    传送门: https://atcoder.jp/contests/abc174 全部 AC 代码:https://atcoder.jp/contests/abc174/submissions/me?f.Task=&f.LanguageName=&f.Status=AC&f.User= D 尺取法,左指针维护前缀为 R 的连通块,右指针维护后缀为 W 的连通块,分情况讨论一下即可。 E 二分答案,检查当前二分出

  • CF401B - Sereja and Contests2021-09-28 18:33:06

    Problem CF有一些比赛,有的比赛只有Div2,其它的既有Div1也有Div2。每个比赛有个标识符,从 \(1\) 开始依次编号,如果一场比赛有Div1和Div2,则Div2的标识符一定是这次比赛的Div1的标识符 \(+1\) 。已知一个人在 \([1,n)\) 的时间段内共打了 \(k\) 次比赛,知道每次比赛是否分Div以及它的标

  • CF1439D INOI Final Contests 题解2021-09-25 19:06:01

    Link. Codeforces Luogu Description. 有 \(m\) 个人,轮流占位置,第 \(i\) 个人出现在 \(a_i(\in[1,n])\) 并往 左/右 方向移动,占领第一个没有人的位置。 一个方案合法,当且仅当没有一个人它没有位置。 一个方案的权值定义为每个人到它目标位置的距离和。 问所有方案的权值和。 Solut

  • AtCoder Beginner Contest 192 完整题意+题解2021-02-20 23:01:24

    目录题解ABCDEF评价 题解 A 给你一个数 \(X\)(\(1\le X\le 10^5\)),求最小的 \(Y>X\) 使得 \(Y\) 是 \(100\) 的倍数。 直接判定即可。 B 给一个字符串,判断是否满足奇数位上是小写字母,偶数位上是大写字母。 也可以直接判定。 C 称一次操作为将一个数赋值为这个数的各个数字按照从大到

  • java ,学习网站2020-12-30 15:33:55

    LeetCode https://leetcode.com/ 浙江大学 Online Judge https://zoj.pintia.cn/contests

  • AtCoder题解 —— AtCoder Beginner Contest 185 —— A - ABC Preparation2020-12-13 22:58:54

    题目相关 题目链接 AtCoder Regular Contest 185 A 题,https://atcoder.jp/contests/abc185/tasks/abc185_a。 Problem Statement Takahashi has decided to hold some number of programming contests. Holding one contest requires one 100-point problem, one 200-point pro

  • CF A. Dreamoon and Ranking Collection 【模拟】2020-04-05 10:58:44

    A. Dreamoon and Ranking Collection time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Dreamoon is a big fan of the Codeforces contests. One day, he claimed that he will collect all the place

  • 2017 ICPC Asia Xian Onsite H. Arrangement for Contests #线段树#2020-01-29 13:07:09

    Portal 很容易想到贪心+线段树查询维护 UVa上这题是假数据 O(nk)暴力都能0ms AC... 此外输入可能是空文件 坑!!! #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 10; struct node { int l, r, minv, minp, lz; } tree[maxn << 2]

  • AGC40.Two Contests2020-01-24 18:54:41

    题意 \(n\)段区间,要把他们分到两个不同的集合\(S,T\)中,不能有剩余,每个区间只能在一个集合里,令\(S\)中所有区间的交的长度为\(ls\),\(T\)中所有区间的交为\(lt\),求\(max\{ls+lt\}\)。 题解 找到 \(L\) 最大的区间 \(p\) 和 \(r\) 最小的区间 \(q\),那么只有两种情况: \(1.\) \(p,q\)

  • [AGC040B]Two Contests2019-11-09 16:02:19

    Description 给出若干条线段 \((L[i], R[i])\) ,把他们分成两个非空的集合,最大化集合内线段交的和。 \(n\le 10 ^ 5\) Solution 考虑最小的一个右端点 p 和最大的一个左端点 q 。 讨论: p 和 q 在同一集合内,那么选择一条除了这两条外最长的线段单独一个集合,剩下的和 p, q 一起一个

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

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

ICode9版权所有