atcoder 162c game tree

cf1446C. Xor Tree

https://codeforces.com/problemset/problem/1446/C 断断续续想了挺久的,还发现看错题了。 首先一个显然的结论是不会成环,证明显然。 突破口在于从高位往低位考虑,我们按照最高一位的值分成两类,一类是这一位为0,另一类为1,那么显然在我们不进行任何操作的时候 ......
1446 Tree Xor cf

MySQL系列:索引(B+Tree树、构建过程、回表、基本操作、执行计划、应用)

介绍 https://dev.mysql.com/doc/refman/5.7/en/optimization-indexes.html 作用 优化查询 算法 索引的算法包括 BTree Hash RTree FullText GIS B+Tree结构 BTree查找算法图 B+Tree查找算法图( ......
基本操作 索引 过程 MySQL Tree

AtCoder Beginner Contest(abc) 319

B - Measure 难度: ⭐ 题目大意 给定一个数N, 我们要求输出长度为n+1的一个序列Si(i从0到n), 对于Si, 如果存在j(j从1~9)是N的一个除数, 并且i是N/j的一个倍数, 那么Si就是满足条件的最小的j, 如果没存在就输出'-'; 解题思路 数据不大, 暴力即可; 神秘代 ......
Beginner AtCoder Contest 319 abc

AtCoder Beginner Contest 327 (ABC327)

A. ab 直接根据题意模拟即可。 Code B. A^A 直接枚举 \(i= 1, 2,\dots, 15\),每次看看 \(i ^ i\) 是否等于 \(A\) 即可。 Code C. Number Place Description 给你一个 \(9 \times 9\) 的矩阵 \(A\), ......
327 Beginner AtCoder Contest ABC

Educational Codeforces Round 67 (Rated for Div. 2) E. Tree Painting

题目链接 Tree Painting 题面翻译 给定一棵 \(n\) 个点的树 初始全是白点 要求你做 \(n\) 步操作,每一次选定一个与一个黑点相隔一条边的白点,将它染成黑点,然后获得该白点被染色前所在的白色联通块大小的权值。 第一次操作可以任意选点。 求可获得的最大权值 思路 假如说,第一次我 ......
Educational Codeforces Painting Round Rated

AtCoder Beginner Contest 327

A - ab 题意:判断字符串中是否有“ab”或者是“ba“ #include<bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; string s; cin>>s; if(s.find("ab")!=s.npos||s. ......
Beginner AtCoder Contest 327

A Tour Through TREE_RCU's Expedited Grace Periods (翻译)

原文:https://www.kernel.org/doc/html/latest/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html A Tour Through TREE_RCU's Expedited Grace Pe ......
Expedited TREE_RCU Through Periods Grace

A Tour Through TREE_RCU's Grace-Period Memory Ordering (翻译)

原文: https://docs.kernel.org/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html August 8, 2017 This article was contributed by Paul E. McKenney I ......

AtCoder Beginner Contest(abc) 318

B - Overlapping sheets 难度: ⭐ 题目大意 在一个坐标系中给出覆盖多个矩形, 问最后所有矩形覆盖的总面积是多少; 解题思路 坐标系的范围不大, 标记后遍历即可; 还是要注意给的是坐标系的点, 计算的是边; 神秘代码 #include<bits/stdc++.h> #defin ......
Beginner AtCoder Contest 318 abc

G. wxhtzdy ORO Tree

G. wxhtzdy ORO Tree After (finally) qualifying for the IOI 2023, wxhtzdy was very happy, so he decided to do what most competitive programmers do: try ......
wxhtzdy Tree ORO

cf1709E. XOR Tree(启发式合并入门)

cf1709E. XOR Tree 贪心是显然的,关键是如何合并两棵子树的信息,可以采用启发式合并。 #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<map> #include<vecto ......
1709 Tree XOR cf

AtCoder Beginner Contest(abc) 327

B - A^A 难度: ⭐ 题目大意 给出一个数n, 问是否存在一个数m, 使mm = n; 解题思路 因为n的数据范围很大, 到1e18, 经过打表可以发现, 当m=16时就已经大于1e18了, 因为数很多所以用了__int128, 因为double会损失精度; 神秘代码 #include<bit ......
Beginner AtCoder Contest 327 abc

『AtCoder做题记录』I

放假之后回机房第一天,后面洛谷永久封了,第一次尝试AT 随便打打,先试试 不知道那场比赛 T1 题面: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna \(A, ......
AtCoder

AtCoder Beginner Contest(abc) 317

B - MissingNo. 难度: ⭐ 题目大意 给定n个数, 这n个数中最小值到最大值之间缺一个数, 输出这个数; 解题思路 数据不大, 暴力即可; 神秘代码 #include<bits/stdc++.h> #define int long long #define IOS ios::sync_ ......
Beginner AtCoder Contest 317 abc

【杂题乱写】AtCoder-ARC115

AtCoder-ARC115_F Migration * 把问题转化成在某个限制 \(mid\) 下求初始局面和最终局面能到达的最小代价局面,如果相等则说明可达。 比较局面的方式是比较权值,如果相等按字典序比较。 对每个节点 \(u\) 求出权值比 \(u\) 小或权值与 \(u\) 相等且编号比 ......
AtCoder-ARC AtCoder ARC 115

[LeetCode] 1535. Find the Winner of an Array Game

Given an integer array arr of distinct integers and an integer k. A game will be played between the first two elements of the array (i.e. arr[0] and a ......
LeetCode Winner Array 1535 Find

Japan Registry Services (JPRS) Programming Contest 2023 (AtCoder Beginner Contest 324) 赛后总结

Japan Registry Services (JPRS) Programming Contest 2023 (AtCoder Beginner Contest 324) 赛后总结 可悲的是:我没来得及写题解。 Task A Same 秒切。 直接输入排一遍序再遍历即可。 #include <bi ......

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) 赛后总结

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) 赛后总结 又没来得及写题解。。。 赛时 A - ab 查找 ab 和 ba,只要其中一者存在就行。 #include <bits/stdc++.h> using namespace ......
Contest Programming Beginner AtCoder HHKB

HHKB Programming Contest 2023(AtCoder Beginner Contest 327)

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) A - ab int main() { IOS; string s; cin >> n >> s; bool f = false; for (int i = 1; i < n; + ......
Contest Programming Beginner AtCoder HHKB

HHKB Programming Contest 2023(AtCoder Beginner Contest 327)

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) A. ab 解题思路: 模拟即可。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; ......
Contest Programming Beginner AtCoder HHKB

AtCoder Beginner Contest 327

A - ab (abc327 A) 题目大意 给定一个字符串\(s\),问是否包含 ab或ba。 解题思路 遍历判断即可。 神奇的代码 #include <bits/stdc++.h> using namespace std; using LL = long long; int main(void) ......
Beginner AtCoder Contest 327

Binary Tree Level Order Traversal

Source Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). Example Given binary tree ......
Traversal Binary Level Order Tree

Atcoder Grand Contest 016

给我贺完了? A - Shrinking 给定一个串 \(s\),每次可以进行如下操作: 记串长为 \(n\). 构造长为 \(n-1\) 的串 \(s'\),满足 \(s'_i\) 为 \(s_i\) 或 \(s_{i+1}\),令 \(s\leftarrow s'\). 问使 \(s\) 中所有 ......
Atcoder Contest Grand 016

AtCoder Beginner Contest 326 (ABC326)

A. 2UP3DOWN 直接模拟即可。 Code B. 326-like Numbers 枚举,每次拆除百、十、个位,再判断。 Code C. Peak Description 数字线上放置了 \(N\) 个礼物。第 \(i\) 个礼物放置在坐标 \(A_i\) 处。 可以在数轴上选择长度为 \(M ......
326 Beginner AtCoder Contest ABC

AtCoder Beginner Contest(abc) 315

B - The Middle Day 难度: ⭐ 题目大意 在某颗星球上一年有n个月, 给定每个月的天数, 设一年的总天数是m, 请问第m/2(小数向上取整)天是第几个月的第几天; 解题思路 数据不大, 暴力即可; 神秘代码 #include<bits/stdc++.h> #define int l ......
Beginner AtCoder Contest 315 abc

AtCoder Beginner Contest 224 H Security Camera 2

洛谷传送门 AtCoder 传送门 直接糊一手线性规划对偶板板。 要求: \[\min \sum A_i l_i + \sum B_i r_i \]\[\forall i, j, l_i + r_j \ge C_{i, j} \]\[l_i, r_i \ge 0 \]\[l_i, r_i \in \ ......
Beginner Security AtCoder Contest Camera

2D物理引擎 Box2D for javascript Games 第七章 子弹和感应器

2D物理引擎 Box2D for javascript Games 第七章 子弹和感应器 你知道 Box2D 可以在每一个时间步中管理刚体间的碰撞并决算它们。 总之,在愤怒的小鸟中制作攻城机器期间,发生了一些错误 你可能需要注意一下,有时抛射物会穿过城堡,忽略了碰撞。 这里发生了什么? 通常,Jav ......
感应器 子弹 javascript 物理 引擎

[ARC122D] XOR Game

Problem StatementThere are $2N$ integers written on a blackboard. The $i$-th integer is $A_i$. Alice and Bob will play a game consisting of $N$ rounds ......
122D Game ARC 122 XOR

算法学习笔记(34): CMD Tree

对于 CMD Tree 的理解 原文:# 一种轻量级平衡树 这,EXSGT,感觉很像支持分裂 WBLT,但是相对来说思路很简单。 首先,在原文中说了: 能以均摊 \(\Theta(\log n)\) 复杂度完成一系列区间问题 但是没说的是,这些区间一定是固定的(没有增加的情况) 也就是说,更多的是处 ......
算法 笔记 Tree CMD 34

AtCoder Beginner Contest(abc) 314

B - Roulette 难度: ⭐ 题目大意 有一个猜数字的游戏, 有n个人参加, 每人都猜了若干个数; 最后给出答案数字; 在所有猜中数字的人中输出猜数数量最少的人的编号;(可能不止一个); 解题思路 数据不大, 暴力即可; 神秘代码 #include<bits/stdc++.h> #defin ......
Beginner AtCoder Contest 314 abc
共1440篇  :10/48页 首页上一页10下一页尾页