文章列表

筛选

打怪鬼脸 做鬼脸

摘要:#include<bits/stdc++.h>#include<conio.h>#include<windows.h>using namespace std;double shanghai[20]={……

2048上下左右

摘要:#include <iostream>  #include <windows.h>  #include <ctime>  using namespace std;    int const ROW =……
精品文章

每日算法题:反转链表

摘要:描述(来自牛客):给定一个单链表的头结点pHead(该头节点是有值的,比如在下图,它的val是1),长度为n,反转该链表后,返回新链表的表头。数据范围:0≤n≤1000要求:空间复杂度 O(1) ,时……
精品文章

每日算法题:二分查找

摘要:描述(来自牛客):请实现无重复数字的升序数组的二分查找。给定一个 元素升序的、无重复数字的整型数组 nums 和一个目标值 target ,写一个函数搜索 nums 中的 target,如果目标值存在……

C进制转换(不带/带前缀)

摘要:无前缀方式:printf("%o",num)  //无前缀o的8进制数printf("%d",num)  //无前缀0d的10进制数printf("%x",num)  //无前缀0x的小写16进制数p……

三个数找最大值

摘要:#include<stdio.h> int main() {  int a,b,c;  scanf("%d %d %d",&a,&b,&c);  if(a>b)  ……

贪吃蛇(修改版)

摘要:#include<stdio.h>#include<time.h>#include<windows.h>#include<stdlib.h>#define U 1#define D 2#define ……

二级C语言-等差数列

摘要:#include<stdio.h> int main() { int n,i,sum,An; scanf("%d",&n); An = 2+(n-1)*3;//此行为等差数列通项公式……