@hdu - 6428@ Problem C. Calculate】的更多相关文章

目录 @description@ @solution@ @accepted code@ @details@ @description@ 给定 A, B, C,求: \[\sum_{i=1}^{A}\sum_{j=1}^{B}\sum_{k=1}^{C}\phi(gcd(i, j^2, k^3))\mod 2^{30}\] Input 第一行给定一个整数 T,描述数据组数. 接下来每组数据包含三个整数 A, B, C,含义如上. 1 ≤ T ≤ 10, 0 < A, B, C ≤ 10^7 Out…
6343.Problem L. Graph Theory Homework 官方题解: 一篇写的很好的博客: HDU 6343 - Problem L. Graph Theory Homework - [(伪装成图论题的)简单数学题] 代码: //1012-6343-数学 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<bitset&g…
题解 代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1LL<<30; const int N = 10000000; int prime[N+5], low[N+5], check[N+5], pow_cnt[N+5], tot, f[N+5], f2[N+5], f3[N+5]; void sieve() { memset(check, 0, sizeof…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6343 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Problem DescriptionThere is a complete graph containing n vertices, the weight of the i-th vertex is wi.The length…
Problem E. TeaTree Problem Description Recently, TeaTree acquire new knoledge gcd (Greatest Common Divisor), now she want to test you.As we know, TeaTree is a tree and her root is node 1, she have n nodes and n-1 edge, for each node i, it has it’s va…
hdu 3374 String Problem 最小表示法 view code#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <map> #include <string> using namespace std; const int N = 10010; int n; char s[105]; map<…
传..传送:http://acm.hdu.edu.cn/showproblem.php?pid=5687 Problem C Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2697    Accepted Submission(s): 743 Problem Description 度熊手上有一本神奇的字典,你可以在它里面做如下三个…
6342.Problem K. Expression in Memories 这个题就是把?变成其他的使得多项式成立并且没有前导零 官方题解: 没意思,好想咸鱼,直接贴一篇别人的博客,写的很好,比我的垃圾好多了... HDU 6342(模拟) 贴一下一个队友的代码: //1011-6342-模拟 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include…
6336.Problem E. Matrix from Arrays 不想解释了,直接官方题解: 队友写了博客,我是水的他的代码 ------>HDU 6336 子矩阵求和 至于为什么是4倍的,因为这个矩阵是左上半边有数,所以开4倍才能保证求的矩阵区域里面有数,就是图上的红色阴影部分,蓝色为待求解矩阵. 其他的就是容斥原理用一下,其他的就没什么了. 代码: //1005-6336-矩阵求和-二维前缀和+容斥-预处理O(1)查询输出 #include<iostream> #include&…
Problem C Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1196    Accepted Submission(s): 371 Problem Description 度熊手上有一本神奇的字典,你可以在它里面做如下三个操作: 1.insert : 往神奇字典中插入一个单词 2.delete: 在神奇字典中删除所有前缀等于…