NeverGiveUp2019
NeverGiveUp2019
全部文章
题解
归档
标签
去牛客网
登录
/
注册
NeverGiveUp2019的博客
全部文章
/ 题解
(共33篇)
题解 | #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
527
题解 | #扑克牌大小#
#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
344
题解 | #扑克牌大小#
#include <stdio.h> #include <string.h> typedef enum { TYPE_ONE = 0, //个子 TYPE_PAIR, //对子 TYPE_STAIGHT, ...
C
2022-04-08
0
304
题解 | #查找两个字符串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
307
题解 | #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
321
题解 | #成绩排序#
#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
297
题解 | #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
369
题解 | #公共子串计算#
#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
292
题解 | #找出字符串中第一个只出现一次的字符#
#include <stdio.h> int main() { char input[1001] = {0}; int *ishave = malloc(sizeof(int) * 300); while(scanf("%s", input) != E...
C
2022-03-31
0
340
题解 | #高精度整数加法#
#include <stdio.h> int main() { char num_str[2][10001] = {0}; /* 输入 */ for(int i = 0; i < 2; i++) { if(NULL == ...
C
2022-03-30
0
390
首页
上一页
1
2
3
4
下一页
末页