Problem - 1707A - Codeforces A. Doremy's IQ time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Doremy is asked to test?nn?contests. Contest?ii?can only be tested on day?ii. The difficulty of c...
Educational Codeforces Round 130 (Rated for Div. 2) A. Parkway Walk 题目描述 求走完所有距离所需最小的补充能量数 题目分析 用所需总能量数减去初始能量即可 code #include<bits/stdc++.h> using namespace std; int n, m, k, t; void solve()
{ int sum...
Problem - B - Codeforces B. Difference Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an array?aa?consisting of?nn?non-negative integers. It is guaranteed that?aa?is sorted...
给你一个序列,每次可以选择一个数 x x x,将 [ l , r ] [l,r] [l,r]段内所有数异或上 x x x,花费 ? r ? l + 1 2 ? \lceil \frac{r-l+1}2{}\rceil ?2r?l+1??,问最少花费多少能够让整个序列都变成0可以发现在区间上处理不会优于区间内...
A. Hossam and Combinatorics 统计一下最小和最大值的个数分别是多少,则 a n s = 2 ? c n t m i n ? c n t m a x ans=2*cnt_{min}*cnt_{max} ans=2?cntmin??cntmax?,如果最大值等于最小值, a n s = 2 ? n ? ( n ? 1 ) ans=2*n*(n-...