题解列表

筛选

1169: 绝对值排序

摘要:C语言网刷题以来首次碰到用 pair 的题。#include<bits/stdc++.h> using namespace std;   bool cmp(pair<int,int> &a,pa……

1015: [编程入门]求和训练

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    double a,b,c,d=0,e=0,f=0,Sn……

1739: 成绩排序

摘要:结构体的排序,自己写一个 sort 函数的比较算法就好了。#include<bits/stdc++.h> using namespace std; struct student{     s……

C语言判断ip合法简洁方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[30]; int a,b,c,d,i; int flag=……

函数之字符串拷贝-C语言

摘要:解题思路:按顺序输入题目要求:数字n  一行字符串  数字m;那数字可以用scanf()函数输入,一串字符串的输入可以用gets()或者scanf()和for循环结合来实现,但是当在scanf()后面……