ICode9

精准搜索请尝试: 精确搜索
  • 问题 M: Contest Timing2021-07-30 17:35:25

    题目描述 Bessie the cow is getting bored of the milk production industry, and wants to switch to an exciting new career in computing. To improve her coding skills, she decides to compete in the on-line USACO competitions. Since she notes that the contest s

  • UCF Local Programming Contest Round 解题/补题报告2021-07-29 19:33:25

    A  Briefcases Full of Money 题目大意: 输入各个面值钞票的数量,根据题目中的面值,求出和最大的钞票面值 如果有相同的输出钞票数最少的 #include<bits/stdc++.h> using namespace std; const int maxn=100005; long long cnt=0; int main(){ int a[10],b[6]={1,5,10,20,5

  • Codeforces Harbour.Space Scholarship Contest 2021-2022/1553E Permutation Shift2021-07-28 16:31:44

    题目链接:https://codeforces.com/contest/1553/problem/E 题目大意:是否能在转置\(k\)轮和交换\(m\)次的条件下将\((1,2,3,...,n)\)变成\((a_{1},a_{2},a_{3},...,a_{n})\),\(0\leq k<n,0\leq m\leq \frac{n}{3}\),转置指元素后移\(k\)位,交换指两个元素交换位置 题目思路: 先将每个数都

  • Benelux Algorithm Programming Contest 2020部分题解2021-07-27 23:00:14

    牛客题目链接 F-Generator Grid 这题我在看了解析后突然理解了它的做法,用最小生成树的算法。 那么如何处理发电站呢?可以将发电站看做额外的节点,将发电站与可以建的地方相连。 以示例1为例子,在1建立发电站的费用就是1到4的边长,那么就可以将问题转化为一个最小生成树的问题了,

  • E - Hello XTCPC from: SDUT 2021 Summer Individual Contest - 1(for 20)2021-07-27 09:59:38

    Description You have a string of lowercase letters.You need to find as many sequence “xtCpc” as possible.But letters in the same position can only be used once。 Input The input file contains two lines. The first line is an integer n show the length of

  • The 15th Chinese Northeast Collegiate Programming Contest2021-07-25 19:01:08

    大致题意: 给你一段含n个数字的序列,对于这段序列可以有m次操作。 操作有两种类型: 1、(1,L,R)表示将(L,R)区间的每个数加自身的lowbit值(若一个数为x,则其lowbit值为x&-x). 2、(2,L,R)询问区间(L,R)数字之和 思路: 一眼看上去知道要用线段树维护区间信息,但对于操作1对区间每个数都需要加上其lowb

  • Harbour.Space Scholarship Contest 2021-2022 (open for everyone, rated, Div. 1 + Div. 2)2021-07-25 10:31:14

    A 容易发现只有进位的时候会出现这种情况。 所以直接输出\(\frac{n+1}{10}\)即可。 code: int T,n; int main(){ freopen("1.in","r",stdin); scanf("%d",&T);while(T--){ scanf("%d",&n);printf("%d\n",(n+1)/10);[] } } B 暴力枚举两个端点

  • # The 2020 ICPC Asia Shenyang Regional Programming Contest (ICPC2020沈阳区域赛题解)2021-07-24 22:33:24

    打铁了QAQ D. Journey to Un'Goro 知识点:贪心 找规律 乱搞 如果字符串全r肯定最优(将任意r换成b不会增加贡献) 问题前半部分直接计算即可 问题后半部分我通过打表寻找规律 首先打个DFS #pragma GCC optimize(3) #include<bits/stdc++.h> #define FAST ios::sync_with_stdio(fals

  • Atcoder Regular Contest 096 D - Sweet Alchemy(贪心+多重背包)2021-07-24 14:33:42

    洛谷题面传送门 & Atcoder 题面传送门 由于再过 1h 就是 NOI 笔试了所以题解写得会略有点简略。 考虑差分,记 \(b_i=c_i-c_{fa_i}\),那么根据题意有 \(b_i\le d,i=2,3,4,\cdots,n\),而 \(b_1\) 则没有任何约束条件。而如果我们令某个 \(b_i\) 加 \(1\),其余 \(b_i\) 均不变,那对应到原

  • Harbour.Space Scholarship Contest 2021-2022 题解2021-07-24 09:34:13

    多好的上分机会啊,要是换个时间(指改在 NOI 之后)我说不定就能上 2500 了(做白日梦 ing) A 签到题不多说,显然只有末尾为 \(9\) 的数是 interesting 的,因此答案就是 \(\lfloor\dfrac{n+1}{10}\rfloor\) B 暴力枚举两个断点然后线性地检查一遍,时间复杂度 \(n^3\) 不知道为什么这种题会有

  • CF1553X Harbour.Space Scholarship Contest 2021-2022 (Div. 1 + Div. 2)2021-07-23 20:31:15

    掉大分   E 对于一个序列,把它排回去的最小次数是 $\sum置换环大小-1=错位个数-置换环个数$ 注意到m小于等于n/3。那么最多修正2m个错位。正确位置的个数必须大于等于n/3才可能在m次内修正。 每个点正确位置只有一个。那么整个序列最多有3个位置,以它们为开头满足条件。找出这些位

  • AtCoder Grand Contest 0542021-07-23 17:03:46

    C.Roughly Sorted 题目描述 如果一个排列每个位置上的逆序对个数都 \(\leq k\),那么它是好排列。假设你有排列 \(P\),每次可以交换两个相邻元素,用最小的步数得到好排列 \(P'\) 现给定 \(P'\) 和 \(k\),求可能的 \(P\) 有多少个。 \(n\leq 5000\) 解法 首先考虑知道了排列 \(P\) 怎么

  • AISing Programming Contest 2021(AtCoder Beginner Contest 202)E - Count Descendants2021-07-23 16:33:00

    // Problem: C - Made Up // Contest: AtCoder - AISing Programming Contest 2021(AtCoder Beginner Contest 202) // URL: https://atcoder.jp/contests/abc202/tasks/abc202_c // Memory Limit: 1024 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cped

  • Harbour.Space Scholarship Contest 2021-2022 (open for everyone, rated, Div. 1 + Div. 2)2021-07-23 02:03:18

    A题 题意:找到\(S(x)>S(x+1)\)的数在\(x∈(0,n)\)的范围内的个数S(x)是x的个数数字的和。容易发现x的末尾数字是9时S(x)>S(x+1) 才成立。所以答案是x/10+(x%10==9) #include <bits/stdc++.h> #define re register #define pb push_back #define all(a) a.begin(),a.end() using na

  • 义乌集训7.15 contest 8题解2021-07-22 23:04:52

    2021.7.15 Contest 题解 T1: Description: ​ 平面直角坐标系上有 \(n\) 个点,白云想用一条直线来近似他们。 ​ 白兔告诉白云,使得方差最小的直线是回归直线,若 \(n\) 个点为 \((x_i,y_i), i \in [1, n]\),则回归直线的斜率为 ​ \(k=\frac{\sum^n_{i=1}\big((x_i-x')*(y_i-y')\big)}

  • UCF Local Programming Contest Round 1A A~F题解2021-07-22 21:31:28

    题目链接:点这里 A.Briefcases Full of Money 题意 分别对应数量的面值币,请你选择总和金额最大的币的面值。如果存在相同的,输出面值最大的。 解题思路 水题,直接取出最大值即可。 AC代码 /** *@filename:A *@author: pursuit *@csdn:unique_pursuit *@email: 2825

  • 义乌集训7.14 contest 7题解2021-07-22 21:00:06

    2021.7.14 Contest 题解 T1: Description: ​ 给定整数 \(n\),将 \(1-n\) 分成两组,每一组至少有一个数,并且使得两组数字的和的最大公约数最大,请输出最大的最大公约数。 Input: ​ 一行一个正整数 \(n\)。 Output: ​ 一行一个整数,表示答案。 Sample1 Input: 6 Sample1 Output: 7

  • UCF Local Programming Contest Round 1A(题解)2021-07-22 20:00:51

    UCF Local Programming Contest Round 1A_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ (nowcoder.com) A-Briefcases Full of Money_UCF Local Programming Contest Round 1A (nowcoder.com) 题目大意:给定你五种钞票的面额,$1,$5,$10,$20,$50,$100,再给定每种钞

  • 义乌集训7.12 contest 5题解2021-07-22 19:33:16

    2021.7.11 Contest 题解 T1: Description: 给定序列 \(a_1,a_2,...,a_n\) ,算出 \(t_1,t_2,...,t_n\) 满足 \(\forall t_i\gt0\); 对于所有的 \(i\) \((1\le i\lt n)\) , \(a_i*a_{i+1}*t_i*t_{i+1}\) 是完全平方数; \(\Pi_{i=1}^n t_i\) 最小。 请输出最小的 \(\Pi_{i=1}^n t_i\)

  • Arc123 D2021-07-21 20:32:44

    Arc123 D 很好考场降智了。 感觉\(D\)比\(C\)好做多了。 考虑\(C_i = A_i - B_i\),那么有\(C_{i + 1} \leq C_i,B_i \leq B_{i + 1},A_{i + 1} - B_{i + 1} \leq A_i - B_i \to B_i + max(0,A_{i + 1} - A_{i}) \leq B_{i+1}\) 因为\(|B_i + C_i| \leq A_i\),所以我们应该让\(B_i,

  • UCF Local Programming Contest Round 1A 训练联盟暑假场1 题解2021-07-21 12:06:10

    UCF Local Programming Contest Round 1A 训练联盟暑假场1 题解

  • 2018 Chinese Multi-University Training, Nanjing U Contest2021-07-16 21:34:35

    A:Character Encoding 插板法+容斥 https://blog.csdn.net/codeswarrior/article/details/81906367?utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~BlogCommendFromBaidu~default-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~

  • AtCoder Grand Contest 0472021-07-14 20:02:13

    A - Integer Product 考虑将原来的数全部化为整数,乘上 \(10^9\),那么问题就变成了是否有两个数的乘积是 \(10^{18}\) 的倍数。考虑如果是 \(10^{18}\) 的倍数的话必然是 \(2^{18}\) 和 \(5^{18}\) 的倍数,那么分解出每个数的 \(2,5\) 因子数量,然后再看看有多少个数与它 \(2,5\) 的因

  • 「游记」AtCoder Beginner Contest 2092021-07-11 20:06:32

    才4题(E题不知道错哪了),不过涨了500+Rating 灰名->褐名 A - Counting sbt B - Can you buy them all? sbt C - Not Equal 排个序然后sbt D - Collision 很显然就是问两点之间距离的奇偶性,打了个树剖求lca就过了 自此花费了17分55秒 E - Shiritori 赛时我是利用map把字符

  • AtCoder Regular Contest 120 C - Swaps 2(树状数组)2021-07-09 19:00:06

    题目链接:点我点我 Score : 500500 points Problem StatementGiven are two sequences of length NN each: A=(A1,A2,A3,…,AN)A=(A1,A2,A3,…,AN) and B=(B1,B2,B3,…,BN)B=(B1,B2,B3,…,BN). Determine whether it is possible to make AA equal BB by repeatedly doing the

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

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

ICode9版权所有