NeverGiveUp2019
NeverGiveUp2019
全部文章
分类
题解(35)
归档
标签
去牛客网
登录
/
注册
NeverGiveUp2019的博客
全部文章
(共35篇)
题解 | #矩阵乘法#
#include <stdio.h> int main() { /* 下标 0,1,2分别代表 x,y,z 值 */ int xyz[3]; for(int i = 0; i < 3; i++) { if(scanf("%d"...
C
2022-04-12
0
396
题解 | #数组分组#
#include <stdio.h> typedef struct { int nums[50]; int len; }num_g_t; int sum_5; int sum_3; int left_len; int flag = 0; num_g_t* num_g...
C
2022-04-11
0
279
题解 | #24点游戏算法#
#include <stdio.h> /* 标记此对应此位置得数据是否被使用 1:已使用 0: 未被使用 */ int vis[4] = {0, 0, 0, 0}; int DFS(int* data, int s) { if(s == 24) { r...
C
2022-04-09
3
357
题解 | #扑克牌大小#
#include <stdio.h> #include <string.h> typedef struct { char cmd[21]; char execute[21]; }cmd_execute; int main() { int index...
C
2022-04-08
0
188
题解 | #扑克牌大小#
#include <stdio.h> #include <string.h> typedef enum { TYPE_ONE = 0, //个子 TYPE_PAIR, //对子 TYPE_STAIGHT, ...
C
2022-04-08
0
197
题解 | #查找两个字符串a,b中的最长公共子串#
#include <stdio.h> int main() { char str[2][301] = {0}; int max_len = 0; int max_left = 0; for(int i = 0; i < 2; i++) { ...
C
2022-04-07
0
213
题解 | #MP3光标位置#
#include <stdio.h> int cmd_up(int *current, int* cmd_up, int* cmd_down, int songs) { int flag = 0; /* 首先移动当前歌曲光标位置 */ if(*current =...
C
2022-04-07
0
236
题解 | #成绩排序#
#include <stdio.h> typedef struct { char name[20]; int score; int origin_index; }student_t; int main() { int num, type; ...
C
2022-04-02
1
228
题解 | #DNA序列#
#include <stdio.h> int main() { char dna[1001] = {0}; int num; float max_ratio = 0.000001f; int max_ratio_index = 0; i...
C
2022-04-02
0
272
题解 | #公共子串计算#
#include <stdio.h> int main() { char str[2][151] = {0}; int max_len = 0; for(int i = 0; i < 2; i++) { if(gets(s...
C
2022-03-31
0
212
首页
上一页
1
2
3
4
下一页
末页