ABCD
Educational Codeforces Round 156 (Rated for Div. 2) ABCD
Educational Codeforces Round 156 (Rated for Div. 2) ABCD A. Sum of Three 题意:给定正整数 \(n\),判断是否存在正整数 \(a\),\(b\),\(c\) 满足: \(a+b+c=n\)。 \(a\),\(b\),\(c\) ......
以下对闭包(closure)理解正确的有 ABCD
以下对闭包(closure)理解正确的有 ABCD A 闭包是指有权访问另一个函数作用域中变量的函数; B 函数内再嵌套函数,返回到外部形成闭包; C 内部函数可以引用外层的参数和变量 D 参数和变量不会被垃圾回收机制回收 闭包的作用 1 可以读取函数内部的变量 2 可以把变量始终保存在内存 ......
1.字符串倒序,如“abcd” 则倒序为“dcba”
采用双指针的方法 思路:最后一个和最前面一个交换,两两交换,奇数就是l=r时退出,偶数是l>r时退出 1 #include <stdlib.h> 2 #include <stdio.h> 3 #include <string.h> 4 5 int main() 6 { 7 char pSrc[] = ......
题解 Codeforces Round 887 (Div 1+Div 2) / CF1853AB,CF1852ABCD
下大分!悲!Div 1 只过了 1A!!! 但还是补完整场 Div 2 吧。 # A. Desorting ## problem 用操作:$[1,i]++,[i+1,n]--$,使得数组不单调不降,求最小操作次数。$n\leq 10^5$。 ## solution 操作等同于在差分数组上选出 $i$ ......
AtCoder Beginner Contest 273 ABCD
# [AtCoder Beginner Contest 273](https://atcoder.jp/contests/abc273) ## **A - A Recursive Function** ### Problem Statement 题意:给你一个函数$f(x)$ - $f(0)=1$ ......
牛客小白月赛63 ABCD
https://ac.nowcoder.com/acm/contest/49030 这套题目质量挺好的,E过了200+,状态不佳,改天补补 ###A-子序列的权值最小值 输入 6 1 1 4 5 1 4 输出 0 #include<bits/stdc++.h> using namespace std ......
AtCoder Beginner Contest 296 ABCD
https://atcoder.jp/contests/abc296 ###A - Alternately #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; cons ......