链接:http://acm.hdu.edu.cn/showproblem.php?pid=6325 Interstellar Travel Problem Description After trying hard for many years, Little Q has finally received an astronaut license. To celebrate the fact, he intends to buy…
Description The most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y1999 and called it M11. It has only one eye on the left side of its head and just three feet al…
Travel Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 46 Accepted Submission(s): 20 Problem Description Jack likes to travel around the world, but he doesn’t like to wait. Now, he is trave…
2018 HDU多校第三场赛后补题 从易到难来写吧,其中题意有些直接摘了Claris的,数据范围是就不标了. 如果需要可以去hdu题库里找.题号是6319 - 6331. L. Visual Cube 题意: 在画布上画一个三维立方体. 题解: 模拟即可. 代码: #include <bits/stdc++.h> using namespace std; int a, b, c, R, C; char g[505][505]; int main () { int T; cin >>…
A - Problem A. Ascending Rating 题意:给出n个数,给出区间长度m.对于每个区间,初始值的max为0,cnt为0.遇到一个a[i] > ans, 更新ans并且cnt++.计算 $A = \sum_{i = 1}^{i = n - m +1} (max \oplus i)$ $B = \sum_{i = 1}^{i = n - m +1} (cnt \oplus i)$ 思路:单调队列,倒着扫一遍,对于每个区间的cnt就是队列的长度,扫一遍即可. #include<…
Problem D. Euler Function 思路:打表找找规律. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define pii pair<int,int> using namespace std; ; ; const int inf=0x3f3f3f3f; const LL INF=0x3f3f3f3f3f3f3…
题解: solution Code: A. Ascending Rating #include<cstdio> const int N=10000010; int T,n,m,k,P,Q,R,MOD,i,a[N],q[N],h,t;long long A,B; int main(){ scanf("%d",&T); while(T--){ scanf("%d%d%d%d%d%d%d",&n,&m,&k,&P,&am…