摘要:
A. Single Push 题目大意:给定两个数组,问你能不能给A数组连续一段加一个数字,使得其等于B数组。 分析:模拟一下即可,就不用想太多了。 代码: #include<bits/stdc++.h> using namespace std; const int maxn=1e5+7; type 阅读全文
摘要:
原题面:https://codeforces.com/contest/1283 A.Minutes Before the New Year 题目大意:给定时间,问距离零点零分还有多久? 分析:注意一下特判0,0就好了。 代码: t = input() t = int(t) for i in rang 阅读全文
摘要:
原题面:https://www.acwing.com/problem/content/201/ 题目大意:给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值。例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mo 阅读全文