llllmz

导航

2024年1月30日

Catch That CowC++

摘要: 其实可以看作一个图,源点是5,5的邻边分别是6,4,10(三种走法),利用BFS,最先遍历17为最少时间。 #include<iostream> #include<queue> #include<vector> using namespace std; struct node{ int data; 阅读全文

posted @ 2024-01-30 22:32 神奇的萝卜丝 阅读(23) 评论(0) 推荐(0)

KY146 魔咒词典C

摘要: #include<stdio.h> #include<string.h> struct node{ char a[100]; char b[100]; }; typedef struct node dir; dir s[100000]; int main(){ char A[200]; int to 阅读全文

posted @ 2024-01-30 20:25 神奇的萝卜丝 阅读(62) 评论(0) 推荐(0)

KY146 魔咒词典C++

摘要: 构建一个map,还是查找问题。 麻烦点就是要 分解输入的过程 #include<iostream> #include<string> #include<map> using namespace std; int main(){ string a,b; map<string,string> m; wh 阅读全文

posted @ 2024-01-30 19:54 神奇的萝卜丝 阅读(36) 评论(0) 推荐(0)

KY27 查找学生信息C

摘要: 简单的结构体查找。要注意C语言中文字符占多个字节,输入输出中文要用%s。 #include<stdio.h> #include<string.h> struct node{ char n[1001]; char name[200]; char x[4]; int age; }; typedef st 阅读全文

posted @ 2024-01-30 17:34 神奇的萝卜丝 阅读(18) 评论(0) 推荐(0)

KY27 查找学生信息C++

摘要: 用map做查找就行了。 #include<iostream> #include<string> #include<map> using namespace std; struct node{ string name; string x; int age; }; typedef struct node 阅读全文

posted @ 2024-01-30 16:51 神奇的萝卜丝 阅读(20) 评论(0) 推荐(0)