扎男_
扎男_
全部文章
分类
题解(3)
归档
标签
去牛客网
登录
/
注册
扎男_的博客
无人问津的港口总会开满鲜花
全部文章
(共89篇)
题解 | 蛇形矩阵
import sys n = int(input().strip()) for i in range(1,n+1) : for j in range(i,n+1) : # 输出的公式是转化后的,其实也可以写去括号前,int()的作用是将结果转化成整型,因为计算结果是有小数的,en...
2025-03-23
1
38
题解 | 判断两个IP是否属于同一子网
活动地址: 牛客春招刷题训练营 - 编程打卡活动import syswhile True: try: x = input().split('.') # 数据输入 y = input().split('.') z = input().split('.')...
2025-03-23
1
36
题解 | 从单向链表中删除指定值的节点 活动地址: 牛客春招刷题训练营 - 编程打卡活动
#include <bits/stdc++.h>using namespace std;int a[1010];int main() { int n,k,x,y,m=1; cin>>n>>x; a[m++]=x; for(int i=...
2025-03-23
1
22
题解 | 数字颠倒
#include<bits/stdc++.h>// 万能头#include <string>using namespace std;int main(){ int n; string s; // 定义 cin>>s;// 字符串输入 rev...
2025-03-23
1
26
题解 | 求int型正整数在内存中存储时1的个数
活动地址: 牛客春招刷题训练营 - 编程打卡活动#include<iostream>#include<bits/stdc++.h>// 函数所属的 头文件 //其实我也忘记是哪个了就用万能头了using namespace std;int main(){ int n; ...
2025-03-21
1
20
题解 | 简单密码
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);...
2025-03-20
1
22
题解 | 单词倒排活动地址: 牛客春招刷题训练营 - 编程打卡活动
#include <stdio.h>#include <stdlib.h>int main(){ char str[1010][22]; // 二维字符数组 int n=0,x; while(1){ x=scanf("%[a-z|A-...
2025-03-19
1
38
题解 | 字符串加密
#include <bits/stdc++.h> using namespace std; int main () { string str, input, keystr; cin >> str; cin >> input; //去重,新...
2025-03-19
1
62
题解 | 删除字符串中出现次数最少的字符
#include <bits/stdc++.h>// 万能头using namespace std;int main() { string s; while(cin>>s){ int mi=1e6; unordered_map<char,int&...
2025-03-15
1
49
题解 | 提取不重复的整数
#include <bits/stdtr1c++.h> // 万能头 using namespace std; int main() { string s; cin>>s;// 输入 set<char>se; // 需要用set来去重 ...
2025-03-14
1
36
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页