链接:https://pan.baidu.com/s/1kVQc9d9 Problem A: #include <cstdio> #include <algorithm> #include <vector> #include <cmath> using namespace std; const int maxn = 222; struct Point { long long x, y; Point(long long x = 0, long long y =…
A. Numbers Joke time limit per test:2 seconds memory limit per test:64 megabytes input:standard input output:standard output Input The input contains a single integer a (1 ≤ a ≤ 30). Output Output a single integer. Example Input 3 Output 27 题目链接:ht…
[题目链接] A. Charm Is Not Always Enough 模拟一下就可以了. #include <bits/stdc++.h> using namespace std; int T; int main() { scanf("%d", &T); while(T --) { int n, m; long long ans = 0; scanf("%d%d", &n, &m); while(n --) { int x;…
题面戳这里 A. Diana and Liana 首先如果s>ks>ks>k一定无解,特判一下.那么我们考虑找恰好满足满足题目中的要求的区间[l,r][l,r][l,r],那么需要要删去的数一定是(l−1)%k+max((r−l+1)−k,0)(l-1)\%k+max((r-l+1)-k,0)(l−1)%k+max((r−l+1)−k,0).前面的表示要把[1,l−1][1,l-1][1,l−1]区间删成kkk的倍数,后面的表示要把这个区间删到kkk长度以内.判断这个值是否不大于能够删的…
Apple Catching Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9831 Accepted: 4779 Description It is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, eac…