题解列表
三个循环作数字的处理与判断
摘要:解题思路:第一个循环判断输入的值是几位数,同时为数组赋值;在第二个循环中,利用上个循环中赋过值的数组,逐个输出数字;第三个循环,倒序输出数字;注意事项:第二行的输出中,最后一个数字后没有空格,因此,我……
信息学奥赛一本通T1440-数的划分 非常简单思路
摘要:解题思路: 由于题目条件:下面三种分法被认为是相同的。{1,1,5};{1,5,1};{5,1,1};所以需要控制排序从小到大 dps( ) n是被分数 number为划分数量 k为划分dps只会产生……
18行代码就可搞定了
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; int i,……
还差50分的话,就要while多组输入。29行代码搞定
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,m; while(cin>>n>>m……
关于三个数字比较建议
摘要:解题思路:通过比较a,b得最大值max1,再比较b,c得最大值max2;再比较max1与max2得出最终结果。注意事项:注意格式最好是能连续输出和输入,这样程序的使用价值更高。参考代码:#includ……
VIP-01背包(简洁)
摘要:#include<stdio.h>#include<string.h>int a[1000][10000];int main(){ int n, m; scanf("%d%d", &n, &m); i……
简短11111111111111111111111111111
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s,v; int t=0; ……
11111111111111111111111111111111111
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a[3][4],i,j,max; int x,y; for(i=0;i<……
1111111111111111111111111111111111111111111111111111111111111
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s; int t=0; wh……