摘要:
A:这是一道签到题吗? 用双层循环模拟即可,注意特殊输出的判断。 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int P = 1e9+7; const int N = 1e2+10; int a[ 阅读全文
摘要:
A:A-B 简单的的高精度减法,数组模拟算术减法即可,注意范围。 #include<bits/stdc++.h> using namespace std; const int N = 1e6; int a[N], b[N], c[N]; int main() { string s1, s2; cin 阅读全文
摘要:
A 直播间红包雨抢券赛 根据规则,若某方领取到陷阱红包则直接判输,因此核心目标是避免领取第 k 个红包,即谁能迫使对方领取第 k 个红包,谁就获胜。这等价于争夺 “领取到第 k-1 个红包” 的控制权 —— 若能确保自己领取到第 k-1 个红包,对方就必然要领取第 k 个红包(陷阱),从而获胜。双方 阅读全文
摘要:
A 小唐的签到 小唐到达教室的时间等于路上所用时间和上楼时间之和,注意如果教室在n楼,只需要上n-1层。 #include<bits/stdc++.h> using namespace std; int main() { int a, x, n, b, y; cin >> a >> x >> n > 阅读全文
摘要:
A 诚信参赛 如果你答案错误,请检查:1. 是否是英语输入状态下的标点符号;2. 逗号后面有个空格。 写这类题时,建议直接复制题目需要输出的内容粘贴到代码里。 #include <stdio.h>int main(void) { printf("sheng si kan dan, cheng xin 阅读全文