题解列表

筛选

数学!!!简单 大大降低时间复杂度

摘要:解题思路:普通暴力嵌套两个循环可以算出来 但是时间超限 那就不得不改变算法了。给定一组数 a1,a2,…,an,我们要求的是它们两两相乘的和,即:S=a1a2+a1a3+⋯+an−1an为了简化计算,……

我的代码最垃圾(哭)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>#define N 100010typedef struct {    int a, b;} i……

点和正方形的关系

摘要:# include <bits/stdc++.h>  using namespace std; int main () { int x,y; cin >> x >> y; ……

计算邮资(C++)

摘要:# include <bits/stdc++.h>  using namespace std; int main () { int n; char c; cin >> n >……

1003: [编程入门]密码破译

摘要:解题思路:注意事项:参考代码:str = input().lower() s = "" for i in str:     if i == &#39;w&#39;:         s += ……

编写题解 1118: Tom数

摘要:解题思路:注意事项:参考代码:while True:     try:         print(sum(list(map(int, input()))))     except:     ……