-----------------心怀虔诚,奋勇前进,fighting!!!!!!

Problem Description:

inclusively:          包括一切地;包含地

simultaneously:   同时

index number   : 指数; 索引编号

if and only if:       当且仅当

-----Rough Translation:

Input:

Output:

For each test case, output one line containing an integer denoting the answer.

-------------------------------一会儿再来补充,我要变得更强丫!

分析:

最优的方案必然是每次询问一个位的具体值,一共有n个二进制位,方案数显然是n!。

复杂度O(min(n,P),P=1e6+3)

我的同学写的一个版本:

#include<cstdio>
#define LL long long const int mod = 1e6+;
int main()
{
LL n;
while(~scanf("%lld",&n))
{
if(n >= mod) puts("");//此处mod可以改为41,因为之前已经有个数可以整除
else { // 2009,7*7*41=2009;
LL ans = ;
for(int i = n; i>; i--) {
ans = (ans*(i%mod))%mod;//ans=(ans%mod*i%mod)%mod;
}
printf("%lld\n",ans);
} }
return ;
}

ACM的探索之Just Skip The Problem的更多相关文章

  1. 2019 Multi-University Training Contest 2: 1010 Just Skip The Problem 自闭记

    2019 Multi-University Training Contest 2: 1010 Just Skip The Problem 自闭记 题意 多测.每次给你一个数\(n\),你可以同时问无数 ...

  2. 哈尔滨工程大学ACM预热赛 G题 A hard problem(数位dp)

    链接:https://ac.nowcoder.com/acm/contest/554/G Now we have a function f(x): int f ( int x ) {     if ( ...

  3. ACM学习历程—HDU 5443 The Water Problem(RMQ)(2015长春网赛1007题)

    Problem Description In Land waterless, water is a very limited resource. People always fight for the ...

  4. ACM学习历程—SNNUOJ 1116 A Simple Problem(递推 && 逆元 && 组合数学 && 快速幂)(2015陕西省大学生程序设计竞赛K题)

    Description Assuming a finite – radius “ball” which is on an N dimension is cut with a “knife” of N- ...

  5. ACM程序设计选修课——1041: XX's easy problem(神烦的多次字符串重定向处理)

    1041: XX's easy problem Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 41  Solved: 7 [Submit][Statu ...

  6. Just Skip The Problem

    http://acm.hdu.edu.cn/showproblem.php?pid=6600 题意:给你一个数x,允许你多次询问yi,然后回答你x xor yi 是否等于yi,询问尽量少的次数以保证能 ...

  7. ACM的探索之Everything is Generated In Equal Probability! 后序补充丫!

    Problem Desciption: 百度翻译后的汉化: 参见博客:https://www.cnblogs.com/zxcoder/p/11253099.html https://blog.csdn ...

  8. 【Henu ACM Round #13 D】A Trivial Problem

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 123...n中末尾0的个数 只会由素因子2和5的个数决定且等于 Min{cnt[2],cnt[5]} 且素因子2的个数一定会比5多 ...

  9. 【HDOJ6600】Just Skip The Problem(签到)

    题意:询问n!模1e6+7的结果 n<=1e9 思路: #include<bits/stdc++.h> using namespace std; typedef long long ...

随机推荐

  1. 手动运行jar包,指定配置文件

    打包程序 mvn package cd target 指定参数运行 java -jar spring-boot-demo-0.0.1-SNAPSHOT.jar --spring.profile.act ...

  2. SCSS的基本操作

    Sass是成熟.稳定.强大的CSS预处理器,而SCSS是Sass3版本当中引入的新语法特性,完全兼容CSS3的同时继承了Sass强大的动态功能. 特性概览 CSS书写代码规模较大的Web应用时,容易造 ...

  3. testclass面试题

    http://www.testclass.net/interview/selenium/   seleniuim面试题 http://www.testclass.net/interview/inter ...

  4. C语言各语句的作用

    #include <stdio.h> 在使用标准函数库中的输入输出函数时,编译系统要求程序提供有关的信息(例如对这些输入输出函数的声明),#include<stdio.h>的作 ...

  5. LED Keychain - Widely Used Logo Item

    The LED keychain makes it easy for people to carry their keys with them and carry them with them. It ...

  6. sql 应用记录

    SELECT * FROM (select aa.*,bb.mentalvisitid, ' then '家庭访视' else '电话' end as BCSFXS ,bb.visitdate, ' ...

  7. python使用libnum,gmpy2快速解RSA

    直接贴出Pcat师傅的解题脚本 # -*- coding:utf8 -*- __author__='pcat@chamd5.org' import libnum import gmpy2 n=7306 ...

  8. IDEA常用操作链接

    idea中svn的提交.更新等操作 https://jingyan.baidu.com/article/375c8e19e3c47a25f3a22955.html Idea 部署SVN详细步骤以及上传 ...

  9. 阿里巴巴手册之-Arrays.asList()数组转集合的问题

    转载来源:https://blog.csdn.net/qq_36443497/article/details/79663663?utm_source=blogxgwz9 在使用工具类Arrays.as ...

  10. 1059 Prime Factors (25分)

    1059 Prime Factors (25分) 1. 题目 2. 思路 先求解出int范围内的所有素数,把输入x分别对素数表中素数取余,判断是否为0,如果为0继续除该素数知道余数不是0,遍历到sqr ...