unlocking education benefits success

Educational Codeforces Round 91 (Rated for Div. 2) A. Three Indices

给一个 \(n\) 个整数的排列 \(p_1, p_2, \cdots, p_n\) ,需要找到三个数 \(i, j, k\) 满足: \(1 \leq i < j < k \leq n\) \(p_i < p_j\) , \(p_j < p_k\) 否则回答不可能。 \(key\) :若存在上述 ......
Educational Codeforces Indices Round Rated

Educational Codeforces Round 116 (Rated for Div. 2) A. AB Balance

给一个长为 \(n\) 的字符串 \(s\) ,只包含 \(0\) \(1\) 两种字符。定义 \(AB(s)\) 是 \(s\) 中出现的 \(01\) 子串个数,\(BA(s)\) 是 \(s\) 中出现的 \(10\) 子串个数。 在一步操作中,可以选择一个字符进行异或。询问最小的操作次数使得 ......
Educational Codeforces Balance Round Rated

Educational Codeforces Round 96 (Rated for Div. 2) A. Number of Apartments

有三种建筑:三室厅、五室厅、七室厅。每个房间严格有一扇窗户。现在有 \(n\) 扇窗户,询问完全用完这些窗户的情况下,\(3, 5, 7\) 室厅各有多少间。输出任意一种答案,或者回答不可能。 假设一定有解,显然可以选择 \(mod\) 任意一个数贪心,不妨选最小的 \(3\) 。假设答案为 \(a ......

Educational Codeforces Round 156 (Rated for Div. 2) A-E

A题签到题 分余1 余2 余0讨论 #include<bits/stdc++.h> using namespace std ; #define maxn 400100 #define int long long int read(){ int ans = 0 , f = 1 ; char ch = ......
Educational Codeforces Round Rated 156

Educational Codeforces Round 105 (Rated for Div. 2) A. ABC String

给一个长为 \(n\) 的字符串 \(a\) ,\(n\) 是偶数,字符串中只包含三种字符 \(A, B, C\) 。规定一个合法的字符串为一个符合入栈规则的字符串。 需要构造一个长为 \(n\) 的括号字符串 \(b\) 。 \(b\) 是一个合法的括号序列 \(\forall 1 \leq i ......
Educational Codeforces String Round Rated

Educational Codeforces Round 156 (Rated for Div. 2) - A B C D

目录A. Sum of Three A. Sum of Three 如果说给定的数为 n 如果 \(n \le 6\) 或 \(n = 9\) 时,无法分解 如果 $n %% 3 != 0 $ 时,可以 ......
Educational Codeforces Round Rated 156

Educational Codeforces Round 156 A-D

A. Sum of Three 思路1: 1.把数拆成1,2,n-3 2.如果(n-3)%3==0,那么拆成1,4,n-5,可证明n-3如果可被3整除,那么再左移两位一定除不尽 思路2: 1.如果n是奇数,那么可取一个数为2,其他两数为相邻数,如果两数其中一位被整除,那么两者往外走 2.如果n为偶, ......
Educational Codeforces Round 156 A-D

Educational Codeforces Round 156 (Rated for Div. 2)

Preface 沉迷Galgame不打CF懒狗闪总出列! 这场在大物课上口胡了前四个题,回去写了也都很顺,然后E题本来做不来的,看了眼昨天校队群里的消息就会做了 F题什么东西直接弃 A. Sum of Three 当\(n\bmod 3\ne 0\)时,用\((1,2,z)\)来凑;否则当\(n\b ......
Educational Codeforces Round Rated 156

Educational Codeforces Round 109 (Rated for Div. 2) B. Permutation Sort

给一个长为 \(n\) 的排列 \(a\),你可以执行以下操作:选择一个子数组并且按任意顺序重排,但这个子数组不能是数组本身。 询问最少经过多少次操作可以使得排列 \(a\) 变为升序。 定义操作次数为 \(ans\) 。 若数组已经有序,\(ans = 0\) 。 若 \(a_1 = 1\) 或者 ......

Educational Codeforces Round 110 (Rated for Div. 2) Array Reodering

给一个长为 \(n\) 的数组 \(a\) 。 定义一对 \(pair(i, j)\) 是 \(good\) 的当且仅当 \(1 \leq i < j \leq n\) 且 \(gcd(a_i, 2 \cdot a_j) > 1\) 。 如果你可以以任意顺序重排数组 \(a\) ,找到最多的 \(g ......
Educational Codeforces Reodering Array Round

Educational Codeforces Round 156 (Rated for Div. 2)

Educational Codeforces Round 156 (Rated for Div. 2) A. Sum of Three 解题思路: 如果\(n \leq 6 或 n =9\),无解。 若\(n \% 3 == 0,t = \lfloor\frac{3}{n}\rfloor\): 若\ ......
Educational Codeforces Round Rated 156

Educational Codeforces Round 152 (Div. 2) D. Array Painting(双指针)

Educational Codeforces Round 152 (Div. 2) D. Array Painting //思路:双指针找连续正数段 //若段中出现2,则更新两头的0的情况,若为涂色则改为true //若无2,则优先更新左侧0,若左0已经为true,则更新右侧0 //数组开头结尾特判 ......
指针 Educational Codeforces Painting Array

练习记录-cf-Educational Codeforces Round 156 (Rated for Div. 2)(A-C)

好久没打了 还是就出了三道 不过还好没掉分 A. Sum of Three 就是问能不能把一个数拆成三个不同的 且都不能被三整除的数 我的思路就是拆成1+2+一个大于等于4的数 如果拆了后另一个数是%3==0 那么我拆成1+4它肯定就不被整除 然后判下相同 #include<bits/stdc++. ......

编写脚本,使用for和while分别实现192.168.0.0/24网段内,地址是否能够ping通,若ping通则输出"success!",若ping不通则输出"fail!"

for方法: [14:20:07 root@centos8 ~]#cat ping_for.sh#!/bin/bash​# # Copyright (C) 2021 IEucd Inc. All rights reserved.## 文件名称:ping_for.sh# 创 建 者:TanLiang# ......
通则 quot ping 网段 脚本

Educational Codeforces Round 155 (Rated for Div. 2)

\(A. Rigged!\) 直接取第一个人能举起的最大重量看他是否是冠军即可。 void solve(){ int n=read(); int fx=read(),ft=read(); int ans=fx; for(int i=1;i<n;i++){ int x=read(),t=read(); ......
Educational Codeforces Round Rated 155

VMware ESXi 7.0 U3o macOS Unlocker & OEM BIOS 标准版和厂商定制版

VMware ESXi 7.0 U3o macOS Unlocker & OEM BIOS 标准版和厂商定制版 ESXi 7.0 标准版和 Dell (戴尔)、HPE (慧与)、Lenovo (联想)、Inspur (浪潮)、Cisco (思科) 定制版镜像 请访问原文链接:https://sysi ......
Unlocker 标准 VMware macOS ESXi

VMware ESXi 7.0 U3o macOS Unlocker & OEM BIOS 集成网卡驱动和 NVMe 驱动 (集成驱动版)

VMware ESXi 7.0 U3o macOS Unlocker & OEM BIOS 集成网卡驱动和 NVMe 驱动 (集成驱动版) ESXi 7 U3 标准版集成 Intel 网卡、Realtek USB 网卡 和 NVMe 驱动 请访问原文链接:https://sysin.org/blog ......
网卡驱动 网卡 Unlocker VMware macOS

Educational Codeforces Round 112 (Rated for Div. 2) A. PizzaForces

有三种披萨:\(6\)、\(8\)、\(10\) 块披萨。制作时间分别需要:\(15\)、\(20\)、\(25\) 分钟。现在有 \(n\) 个人,每人需要一块披萨。询问使所有人能获得披萨的最快时间。 观察:发现三种披萨的性价比都一样。(否则按最优性价比贪心) 需要让得到的披萨数量 \(m \ge ......

Educational Codeforces Round 155 (Rated for Div

B. Chips on the Board 题解:贪心 显然我们可以把题意转化为:对于任意一个\((i,j)\),我们可以花费\(a_{i,j}\)的代价占据第\(i\)行和第\(j\)列,求占据所有格子的最小代价 考虑两种情况: 在每一行选一个格子 在每一列选一个格子 贪心选即可 int n, a ......
Educational Codeforces Round Rated 155

Educational Codeforces Round 122 (Rated for Div. 2)

A. Div. 7 #include<bits/stdc++.h> using namespace std; void solve(){ int n , a , b , c ; cin >> n; c = n % 10 , n /= 10; b = n % 10 , n /= 10; a = n % ......
Educational Codeforces Round Rated 122

Educational Codeforces Round 155 (Rated for Div. 2)

Preface 这天晚上这场因为不明原因(玩CCLCC中)就没有打,只能赛后补一下 这场的EF都不算难初看都有做法,但好家伙E写挂两发,F写个根号做法直接T到天上去了 A. Rigged! 签到题,对于所有的\(e_i\ge e_1\)的\(i\),求出\(S=\max s_i\),根据\(S+1\ ......
Educational Codeforces Round Rated 155

CF1197 Educational Codeforces Round 69 (Rated for Div. 2)

CF1197A DIY Wooden Ladder 答案为 \(\min(a_{n-1},n-2)\)。 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; const int N=100005; ......
Educational Codeforces Round Rated 1197

CF1036 Educational Codeforces Round 50 (Rated for Div. 2)

CF1036A Function Height 答案为 \(\lceil \frac{k}{n}\rceil\)。 #include<iostream> #include<cstdio> using namespace std; long long n,k; int main() { scanf(" ......
Educational Codeforces Round Rated 1036

Educational Codeforces Round 155 D (CF1879_D)

题目大意 给一个长度为 \(n\) 的数组,求 \(\Sigma_{i=1}^{n} \Sigma_{j=i}^{n} 区间异或和 \times (j-i+1)\) 其中 \(n\leq 3e5,~a[i]\leq 1e9\) 分析 首先注意到由 \(l\) 到 \(r\) 的区间异或和可以转化为 ......
Educational Codeforces Round 1879 155

Educational Codeforces Round 155 (Rated for Div. 2)

Educational Codeforces Round 155 (Rated for Div. 2) A. Rigged! 解题思路: 若存在\(s[i] >= s[1]\)并且\(e[i] >= e[i]\),那么答案为\(-1\). 否则,答案为\(s[1]\). 代码: #include < ......
Educational Codeforces Round Rated 155

VMware ESXi 8.0U2 macOS Unlocker & OEM BIOS 标准版和厂商定制版

VMware ESXi 8.0U2 macOS Unlocker & OEM BIOS 标准版和厂商定制版 ESXi 8.0U2 标准版,Dell (戴尔)、HPE (慧与)、Lenovo (联想)、Inspur (浪潮) 等定制版 请访问原文 https://sysin.org/blog/vmwa ......
Unlocker 标准 VMware macOS ESXi

VMware ESXi 8.0U2 macOS Unlocker & OEM BIOS 集成网卡驱动和 NVMe 驱动 (集成驱动版)

VMware ESXi 8.0U2 macOS Unlocker & OEM BIOS 集成网卡驱动和 NVMe 驱动 (集成驱动版) 发布 ESXi 8.0U2 集成驱动版,在个人电脑上运行企业级工作负载 请访问原文链接:https://sysin.org/blog/vmware-esxi-8-u ......
网卡驱动 网卡 Unlocker VMware macOS

Educational Codeforces Round 155 (Rated for Div. 2)

比赛链接 A. Rigged! 题目链接 就是一个比较简单的模拟就可以解决,如何判断能不能第一只需要考虑比他力量大的耐力是不是也比他大就行,而只要比他大,他就不可能第一,否则输出他的力量作为标杆就行,这样也可以避免比他力量小的也可以举起来。 #include<bits/stdc++.h> using ......
Educational Codeforces Round Rated 155

Educational Codeforces Round 97 (Rated for Div 2) G. Death DBMS

Problem - G - Codeforces 题意 给定n个字符串,每个字符串有一个值val,n次询问,每次给一个字符串,询问给定n个字符串中是询问字符串子串的值的最大值 分析 多模式匹配,从中找到给定串的子串,想到建立ac自动机,对于给定字符串,在自动机上面匹配时,沿fail指针向上跳并求最大 ......
Educational Codeforces Death Round Rated

Educational Codeforces Round 123 - D(思维题)

目录D. Cross Coloring D. Cross Coloring 题意 $n \times m $ 的方格纸上进行 q 次操作,每次操作选择某整行 x 和某整列 y,使得行 x 和列 y 均涂上 k 种颜色中的一种。问你最终的方案数 思路 代码 //>>>Qiansui #include< ......
Educational Codeforces 思维 Round 123