首页 > TAG信息列表 > 732

【732】as follows 使用方法

比较推荐的使用方法为: blah blah as follows: (1) Blah blah blah; (2) blah blah blah; and (3) blah blah blah. 说明: 用冒号结尾 (1) 后面的第一个字母大写 然后结尾用分号 最后用 and 相连 如果句子过长,则都改成句号,然后都按照完整的句子来表述即可! blah blah as follows. (

《Codeforces Round #732 (Div. 1)》

题目一题比一题难读..... A:签到了属于是。 考虑每个点操作偶数次才能保证方向不变。 那么对于它排序后的位置一定要保证距离为偶数距离才行。 // Author: levil #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; const int N =

Codeforces Round #732 (Div. 2)

Codeforces Round #732 (Div. 2) Problem A. AquaMoon and Two Arrays 数组\(a_n,b_n\)由非负整数组成,要求一个方案让\(a_n\)按下列规则变化后等于\(b_n\) 选择\((i,j)\)后操作:\(a'_i = a_i - 1 , a'_j = a_j + 1,a'_k(k\ne i,j)=a_k\) 若无法完成任务输出\(-1\) 对于\(100\%\)的

Codeforces Round #732 (Div. 2)

Codeforces Round #732 (Div. 2) A - AquaMoon and Two Arrays 模拟 int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int _; for (cin >> _; _; --_) { int n; cin >> n; vector<int> a(n), b

Codeforces Round #732 (Div. 2)

B. AquaMoon and Stolen String 这题就是把一个字符串拿走了,但是给了我们原来的和剩下的,所以别看中途配对又交换了,直接相减就行了。 代码 string s[N], s1[N]; int main() { //ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n, m;

Codeforces Round #732 (Div. 2)

绝赞自闭 China Round A 模拟。 无解的情况是前后总和不等。 然后当 \(a_i>b_i\) 时就向后填,\(a_i<b_i\) 时就把后面的搬过来,这样操作就能保证 \(a=b\) 了。 #pragma GCC optimize("O3") #include<bits/stdc++.h> using namespace std; #define endl '\n' #define debug(x) cerr <