牛客255581536号
牛客255581536号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客255581536号的博客
全部文章
(共54篇)
题解 | #整型数组合并#
#include <iostream> using namespace std; int main() { int a, b; cin >> a; int c[a]; for (int i = 0; i < a; i++) ...
2023-07-17
0
304
题解 | #计算日期到天数转换#
#include <iostream> using namespace std; int isrun(int n) {//判断是否闰年 if (n % 100 == 0) return 0; if (n % 4 == 0) return 1; return 0; ...
2023-07-14
0
222
题解 | #百钱买百鸡问题#
#include <iostream> using namespace std; int main() { int a, b, c, d, e; for (a = 0; a <= 100 / 5; a++) { b = 100 - a;//鸡母、鸡雏...
2023-07-14
0
180
题解 | #查找输入整数二进制中1的个数#
#include <iostream> using namespace std; int count(int n) { int a = 0, b; while (n > 0) { b = n % 2; a += b; ...
2023-07-14
0
241
题解 | #完全数计算#
#include <iostream> using namespace std; bool judge(int n) { //判断n是否是完全数 int a, b; b = 0; for (int i = 1; i < n; i++) if ...
2023-07-14
0
253
题解 | #杨辉三角的变形#
#include <iostream> using namespace std; int count(int n) { //求第n行数字个数 return 2 * n - 1; } int num(int n, int i) { //求第n行第i个数的值 if (i &g...
2023-07-13
0
189
题解 | #输出单向链表中倒数第k个结点#
#include <iostream> using namespace std; struct ListNode { int m_nKey; ListNode* m_pNext; }; ListNode* move(ListNode* p, int k) { fo...
2023-07-12
0
265
题解 | #统计字符#
#include <iostream> #include <string> using namespace std; int yingwen(string s){ int i=0; for (int j=0; j<s.length(); j++) { ...
2023-07-11
0
266
题解 | #蛇形矩阵#
#include <iostream> using namespace std; int snake(int x,int y){//根据横纵坐标求数值 int a,b,c; a=x+y-1; b=a*(a+1)/2; c=b-y+1; return...
2023-07-10
0
185
题解 | #单词倒排#
#include <iostream> #include <stack> #include <string> using namespace std; class stack<string> st; int check(){ string s;...
2023-07-10
0
271
首页
上一页
1
2
3
4
5
6
下一页
末页