小牛泰泰
小牛泰泰
全部文章
分类
归档
标签
去牛客网
登录
/
注册
小牛泰泰的博客
全部文章
(共19篇)
题解 | #把字符串转换成整数#
#include <cstddef> // class Solution { // public: // int StrToInt(string str) { // for (size_t i = 0 ; i < str.size(); i++) // ...
2023-08-13
0
360
题解 | #日期累加#
#include <iostream> using namespace std; class Date { public: void Print() { printf("%d-%02d-%02d\n", _year, _month, _day); } ...
2023-08-07
0
328
题解 | #打印日期#
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> using namespace std; class Date { public: void Print() { printf("%d-%02d-%02d\n&qu...
2023-08-07
0
317
题解 | #日期差值#
#include <iostream> using namespace std; class Date { friend istream& operator>> (istream& _in, Date& d); public: int...
2023-08-07
0
314
题解 | #链表的回文结构#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {} };*/ class PalindromeList { public: //利用快慢指...
2023-04-09
0
255
题解 | #链表中倒数第k个结点#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * * @param pListHead ListNode类 * @param k int整型 * @return ListNod...
2023-04-09
0
262
题解 | #计算某字符出现次数#
#include <stdio.h> #include<string.h> #include<ctype.h> int count_ele(char* p, int len, char ch) { if (ch >= 97 ) ...
2023-04-06
0
206
题解 | #字符串最后一个单词的长度#
#include <stdio.h> int main() { char arr[5001] = {0}; gets(arr); int count = 0; int len = strlen(arr); for (int i = len - ...
2023-04-06
0
208
题解 |输入整型数组和排序标识,对其元素按照升序或降序进
#include<stdio.h> #include<stdlib.h> int compare(const void*e1, const void*e2) { return *((int*)e1) - *((int*)e2); } int main() { int ...
2023-04-05
0
266
题解 | #[NOIP2015]金币#
#include<stdio.h> int main() { int k = 0; int count = 0; int i = 0; int j = 0; int sum = 0; scanf("%d",&k); for (i ...
2023-01-22
0
217
首页
上一页
1
2
下一页
末页