首页 > TAG信息列表 > 1117
[AcWing 1117] 单词接龙
DFS 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 50 + 10; int n; string word[N]; int g[N][N]; // g[i][j]表示word[i]和word[j]的重合部分长度 int used[N]; // 记录单词的使用次数 int ans; void dfs(string s,ADV-1117 超级快速幂(数论)
问题描述 给出a,b,c。令p=1000000007, z=b^c, y=a^z, x=y mod p。请求出x。 输入格式 三个整数分别是a,b,c 输出格式 请输出x 数据规模和约定 abc都不超过10^9 思路 不能使用a^(b^c%mod)%mod 考虑费马小定理 当a和p互质时, a ^ (p - 1) % p = 1 最后的结论是a^(b^c1117 Eddington Number (25 分)(简单逻辑)
British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one rides more than E miles. Edding1117: 查找数组元素 Python
1117: 查找数组元素 时间限制: 1 Sec 内存限制: 128 MB 提交: 16642 解决: 8939 [状态] [讨论版] [提交] [命题人:admin] 题目描述 输入n个整数构成一个数组,在这个数组中查找x是否存在,如果存在,删除x,并输出删除元素后的数组。如果不存在,输出“Not Found”。 定义一个查找函数f题解 1117: K-进制数
题目 https://www.dotcpp.com/oj/problem1117.html 参考 https://blog.dotcpp.com/a/75712 思路 n位k进制数,无连续0,找有多少个这样的数 设:这个数为\(XXXXX(X表示还不确定)\) 设:\(_\)表示除0外的数\([1, k-1]\) 设:\(0\)表示0 那么解题的过程就转化为了确定\(X\)的过程 将确定\(X\)1117 Eddington Number (25 分)
British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one rides more than E miles. Eddin1117 Eddington Number (25 分)
British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E days that one rides more than E miles. EddingTips
1.对于一些题目注意找一些性质。(CF 1113 E (a*b)*c=a*(b*c) ) 2.先想清楚在写代码,注意细节(CF 1113 B a[i-1]==b[i-1] 而不是a[i-1]==a[i]&&b[i-1]==b[i]) 3.对于一道题要有一个方向(CF 1117 D 可能有方法是组合数,但是可以用DP来优化这道题) 4.注意时间的把控,一道题想一个方向PAT 甲级 1117 Eddington Number
https://pintia.cn/problem-sets/994805342720868352/problems/994805354762715136 British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the max