随笔分类 - Atcoder/洛谷/namomo OJ
摘要:[AtCoder Regular Contest 109]-C - Large RPS Tournament(记忆化搜索) 题目链接:https://atcoder.jp/contests/arc109/tasks/arc109_c 题面: 题意: 给定一个长度为n的字符串和一个
阅读全文
摘要:AtCoder Beginner Contest 181 -F - Silver Woods(几何,并查集) 题面: 题意: 在一个二维平面中,有直线y=100,y=-100两条直线和\mathit n个钉子,坐标为(x_i,y_i),现在要使一个圆从平面的最左侧移动到最右侧,要求圆一直
阅读全文
摘要:[AtCoder Beginner Contest 175]-F - Making Palindrome(回文串+dijkstra) 题面: 题意: 给定\mathit n 个字符串,每一个字符串使用一次的成本是C_i,每一个字符串可以使用多次,现在问你去选择一些字符串将其按照一定的顺序排列
阅读全文
摘要:AtCoder Beginner Contest 172-F - Unfair Nim(nim博弈,二进制构造) 题意: 有\mathit n堆石子,每一堆有A_i个石头,问最少从第一堆中拿出多少个石子(也不能拿完,即拿出的石子数为$[0,A_1-1])放在第二堆中可以使\mathi
阅读全文
摘要:P3400 仓鼠窝 题目描述 萌萌哒的Created equal是一只小仓鼠,小仓鼠自然有仓鼠窝啦。 仓鼠窝是一个由nm个格子组成的行数为n、列数为m的矩阵。小仓鼠现在想要知道,这个矩阵中有多少个子矩阵!(实际上就是有多少个子长方形嘛。)比如说有一个23的矩阵,那么11的子矩阵有6个,12的子矩阵有
阅读全文
摘要:[AtCoder Beginner Contest 165] E Rotation Matching (构造) Problem Statement You are going to hold a competition of one to one game called AtCoder Janken
阅读全文
摘要:[AtCoder Beginner Contest 164] E Two Currencies (分层最短路) Problem Statement There are NN cities numbered 11 to NN, connected by MM railroads. You are no
阅读全文
摘要:[AtCoder Beginner Contest 163] F path pass i (树型dfs,容斥定律) 链接:https://atcoder.jp/contests/abc163/tasks/abc163_f Problem Statement We have a tree with N
阅读全文
摘要:AtCoder Beginner Contest 163 E Active Infants (DP) Problem Statement There are NN children standing in a line from left to right. The activeness of th
阅读全文
摘要:AtCoder Beginner Contest 151 F Enclose All (最小圆覆盖) Problem Statement Given are NN points (xi,yi)(xi,yi) in a two dimensional plane. Find the minimum r
阅读全文
摘要:[AtCoder Beginner Contest 158] F Removing Robots (线段树+DP) Problem Statement There are NN robots numbered 11 to NN placed on a number line. Robot ii is
阅读全文
摘要:[AtCoder Beginner Contest 151] E Max Min Sums (预处理组合数学,贡献) Problem Statement For a finite set of integers XX, let f(X)=maxX−minXf(X)=maxX−minX. Given
阅读全文
摘要:AtCoder Beginner Contest 152 F Tree and Constraints (容斥定理+树上路径的性质) We have a tree with NN vertices numbered 11 to NN. The ii th edge in this tree conn
阅读全文
摘要:AtCoder Beginner Contest 155 D Pairs , E Payment 题解 D Pairs We have NN integers A1,A2,...,ANA1,A2,...,AN. There are N(N−1)2N(N−1)2 ways to choose two
阅读全文
摘要:AtCoder Beginner Contest 063 D Widespread (二分答案) Time Limit: 2 sec / Memory Limit: 256 MB Score : 400 points Problem Statement You are going out for a
阅读全文
摘要:P2765 魔术球问题 题目描述 «问题描述: 假设有n根柱子,现要按下述规则在这n根柱子中依次放入编号为1,2,3,...的球。 (1)每次只能在某根柱子的最上面放球。 (2)在同一根柱子中,任何2个相邻球的编号之和为完全平方数。 试设计一个算法,计算出在n根柱子上最多能放多少个球。例如,在4 根
阅读全文
摘要:P4016 负载平衡问题 题目描述 G G 公司有 n n 个沿铁路运输线环形排列的仓库,每个仓库存储的货物数量不等。如何用最少搬运量可以使 n n 个仓库的库存数量相同。搬运货物时,只能在相邻的仓库之间搬运。 输入格式 文件的第 11 行中有 11 个正整数 n n ,表示有 n n 个仓库。 第
阅读全文
摘要:P2756 飞行员配对方案问题 题目背景 第二次世界大战时期.. 题目描述 英国皇家空军从沦陷国征募了大量外籍飞行员。由皇家空军派出的每一架飞机都需要配备在航行技能和语言上能互相配合的2 名飞行员,其中1 名是英国飞行员,另1名是外籍飞行员。在众多的飞行员中,每一名外籍飞行员都可以与其他若干名英国飞
阅读全文
摘要:P3119 [USACO15JAN]草鉴定Grass Cownoisseur 题目描述 In an effort to better manage the grazing patterns of his cows, Farmer John has installed one way cow path
阅读全文
摘要:题目描述 摩尔瓦多的移动电话公司摩基亚(Mokia)设计出了一种新的用户定位系统。和其他的定位系统一样,它能够迅速回答任何形如“用户C的位置在哪?”的问题,精确到毫米。但其真正高科技之处在于,它能够回答形如“给定区域内有多少名用户?”的问题。 在定位系统中,世界被认为是一个W×W的正方形区域,由1×
阅读全文