[编程入门]筛选N以内的素数 (C语言代码)sqrt版 摘要:解题思路:发现题解里竟然少有用sqrt函数的,在此做个补充。用sqrt可以极大地减少复杂度,大大降低内存的占用率参考代码:#include<stdio.h>#include<math.h>int ma…… 题解列表 2019年04月18日 0 点赞 0 评论 666 浏览 评分:0.0
字符串问题 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>int main(){ using namespace std; char a[255]; int …… 题解列表 2019年04月18日 0 点赞 0 评论 1003 浏览 评分:0.0
You are my brother (C语言代码) 摘要:解题思路:贴个代码 不想写注释了注意事项:参考代码:#include<stdio.h>typedef struct node{ int a; int b;} L;L A[1005];int main(…… 题解列表 2019年04月18日 0 点赞 0 评论 1394 浏览 评分:9.9
简单方法(C++代码) 摘要:解题思路: c++中的容器set 自动排序+去重 ,完美符合题意,类似的还有很多容器,可以去了解一下注意事项:没啥注意的,照着写就能AC参考代码:#include<bits/stdc++.h>usin…… 题解列表 2019年04月18日 0 点赞 0 评论 548 浏览 评分:0.0
采药 (C语言代码) 摘要:解题思路:虽然超时了,不过还想贴一下昂递归思路来做的把所有可能性算一遍,暴力了一点注意事项:参考代码:#include<stdio.h>#include<string.h>struct node{ i…… 题解列表 2019年04月18日 0 点赞 0 评论 1045 浏览 评分:0.0
采药 (C语言代码) 摘要:解题思路:贴段代码注意事项:参考代码:#include<stdio.h>#include<string.h>int A[150],B[150],C[1500];int main(){ int N,M,…… 题解列表 2019年04月18日 0 点赞 0 评论 1020 浏览 评分:0.0
C二级辅导-公约公倍 (C语言代码)m和n的大小不影响操作!! 摘要:解题思路:注意事项:m和n的大小不影响求模操作!!不需要调换位置!!参考代码:#include<stdio.h>int main(){ int a,b; int max,min; int j,k,t;…… 题解列表 2019年04月18日 0 点赞 0 评论 571 浏览 评分:0.0
优质题解 做幻方 (C++代码) 摘要:解题思路: 一,因为要多组数据,除了动态分配内存,可以用STL中的vector容器来实现 二,(百度百科)传统魔方阵的排列规律如下: ⑴将1放在第一行中间一…… 题解列表 2019年04月18日 5 点赞 0 评论 1661 浏览 评分:7.6
2004年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)简单。。自定义函数。。 摘要:解题思路:划分好重复执行的部分,如每项都重复。再将每项划分成求幂和求阶乘。再用主函数求和。注意事项:无参考代码:#include<stdio.h>double mypow(double x,int n…… 题解列表 2019年04月18日 0 点赞 0 评论 1023 浏览 评分:0.0
C二级辅导-统计字符 (C语言代码)简单!!! 摘要:解题思路:直接看题解。。注意事项:无参考代码:#include<stdio.h>int main(){ char x; int i,j,k,t; x=getchar(); i=j=k=t=0; whi…… 题解列表 2019年04月18日 0 点赞 0 评论 632 浏览 评分:0.0