题解列表

筛选

1079: 射击游戏

摘要:```cpp #include #include #include using namespace std; int n; double dp[7][7][7][7][7][7]; do……

1080: 战场的数目

摘要:```cpp #include #include using namespace std; typedef long long LL; const LL mod=987654321; LL……

耗的时间有点多

摘要:解题思路:注意事项:参考代码:c=[] for i in range(1000,10000):     a=int(i/100)     b=int(i%100)     if (a+b)**……

求大佬只指点

摘要:```c #include #include int main() { int M;//定义输入M scanf("%d", &M); int i; int type[200] ……

质因数分解的模板题

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;ll n,ans;void getans(……

字符串逆序

摘要:解题思路:注意事项:参考代码:n=95859 while True:     n+=1     a=str(n)     b=a[::-1]     if a==b:         pr……

一道简单的数学题(非常短且绝对能听懂)

摘要:解题思路:对于每一对恰好前后颠倒的排列(比如1 3 2 4与4 2 3 1),其价值和为n*(n-1)/2,可以自己尝试一下,会发现很好证明。一共有n!个排列,也就是n!/2对排列,所以答案就是n*(……

时间复杂度O(1)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;ll a,b,n,ans;int main……