-----------------心怀虔诚,奋勇前进,fighting!!!!!! Problem Description: inclusively: 包括一切地;包含地 simultaneously: 同时 index number : 指数; 索引编号 if and only if: 当且仅当 -----Rough Translation: Input: Output: For each test case, output one line contai…
链接:https://ac.nowcoder.com/acm/contest/554/G Now we have a function f(x): int f ( int x ) { if ( x == 0 ) return 0; return f ( x / 10 ) + x % 10; } For a given interval [A, B] (1 <= A <= B <= 10^9), calculate how many integer x that mod f…
Problem Description In Land waterless, water is a very limited resource. People always fight for the biggest source of water. Given a sequence of water sources with a1,a2,a3,...,an representing the size of the water source. Given a set of queries eac…
Description Assuming a finite – radius “ball” which is on an N dimension is cut with a “knife” of N-1 dimension. How many pieces will the “ball” be cut into most?However, it’s impossible to understand the following statement without any explanation.L…
1041: XX's easy problem Time Limit: 1 Sec Memory Limit: 128 MB Submit: 41 Solved: 7 [Submit][Status][Web Board] Description XX is a good student who likes to ask questions.But sometimes when you get the problem, you are not willing to answer his qu…
http://acm.hdu.edu.cn/showproblem.php?pid=6600 题意:给你一个数x,允许你多次询问yi,然后回答你x xor yi 是否等于yi,询问尽量少的次数以保证能求出xi是几,求出这样询问次数最少的询问方案数. 最优方案就是对每位进行询问,每次只让yi的一位是1,一共n个二进制位.方案数为n! #include<bits/stdc++.h> using namespace std; #define ll long long ; ; ll a[maxn];…
Problem Desciption: 百度翻译后的汉化: 参见博客:https://www.cnblogs.com/zxcoder/p/11253099.html https://blog.csdn.net/Cassie_zkq/article/details/97255683https://blog.csdn.net/Cassie_zkq/article/details/97255683…
题意:询问n!模1e6+7的结果 n<=1e9 思路: #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair<int,int> PII; typedef pair<ll,ll> Pll; typedef vector<int> VI…