讲文明的小刺猬向光而行
讲文明的小刺猬向光而行
全部文章
分类
归档
标签
去牛客网
登录
/
注册
讲文明的小刺猬向光而行的博客
全部文章
(共6篇)
题解 | 全排列
#include <stdio.h> int n; int path[10]; // 当前排列 int used[10]; // 标记数字是否已使用 // DFS生成排列 void dfs(int u) { // 终止条件:填满了n个数 if (u...
2026-03-10
0
9
题解 | 数水坑
#include <stdio.h> #define MAXN 105 char g[MAXN][MAXN]; int v[MAXN][MAXN]; int dx[8] = {0, 0, 1, -1, 1, -1, -1, 1}; int dy[8] = {-1, 1, 0, 0, ...
2026-03-10
0
6
题解 | 坐标移动
#include <stdio.h> #include <string.h> int main() { char s[10000]; scanf("%s",s); int len=strlen(s); int x=0,y=0...
2026-03-07
0
9
题解 | 购物单
#include <stdio.h> #include <string.h> int max(int a, int b) { return a > b ? a : b; } int main() { int n, m; scanf("%d ...
2026-03-07
0
13
题解 | 字符串排序
#include <stdio.h> #include <string.h> #include <stdlib.h> int cmp(const void*a,const void*b) { char *ta=*(char **)a;//注意比较的类型是指...
2026-03-06
0
11
题解 | 质数因子
#include <stdio.h> int main() { long long int n; scanf("%lld",&n); int first=1;//控制空格输出 while(n%2==0) { ...
2026-02-24
0
22