题解列表

筛选

最普通的解题方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int i,a,b=1;    scanf("%d",&a);    for(i=1;i<a;i++)  ……

2875: 回文子串

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h> int main( ){    char s[501]={0};    int n,len,beg……

排列 dfs暴力

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; // 全局变量声明 int n, a[5], b[5], m = 0; ……

1107: 纪念品分组

摘要:解题思路:动态数组:vector<int>p(n)sort 对数组进行降序排序两重遍历,只要两项加起来小于等于w,就分为一组已分配好的纪念品置成-1(价格不会达到的数)第一重遍历会遇到已经分配好的纪念……

只用循环做出本题

摘要:解题思路:穷举每个情况注意事项:想好逻辑就行参考代码:#include<stdio.h>int main(){        int n;        scanf("%d", &n);       ……

简单算法,易理解

摘要:解题思路:a和b分别接收字符串,用加号拼接注意事项:参考代码:a=input()b=input()print(a+b)……

最普通的解题方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int n,sum=0;    scanf("%d",&n);    sum=n*2+n*(n-1)/2*……

大一新生用C语言编写的

摘要:解题思路:不知道为啥用scanf,printf就不行注意事项:参考代码:#include<stdio.h>#include<string.h>void fanh(char a[]);//函数的声明in……

发工资咯 记way

摘要: #include using namespace std; int dir[] = { 100, 50, 10, 5, 2, 1 }; int main() {……