摘要: 代码 #include <stdio.h> #include <string.h> //处理的方式和我考虑的一样,但是有一点更为巧妙一点 //它将空格的位置固定在了倒数第三个空格上,这确实更符合常理也更容易输出 int main(){ int n,i,j; int len,flagA,flagB; 阅读全文
posted @ 2023-04-21 10:14 天黑星更亮 阅读(61) 评论(0) 推荐(0)
摘要: 题目 “666”是一种网络用语,大概是表示某人很厉害、我们很佩服的意思。最近又衍生出另一个数字“9”,意思是“6翻了”,实在太厉害的意思。如果你以为这就是厉害的最高境界,那就错啦 —— 目前的最高境界是数字“27”,因为这是 3 个 “9”! 本题就请你编写程序,将那些过时的、只会用一连串“6666 阅读全文
posted @ 2023-04-21 10:11 天黑星更亮 阅读(70) 评论(0) 推荐(0)
摘要: link code #include<bits/stdc++.h> using namespace std; const int N = 100010; int a[N]; int tp[N]; long long ans; void merge(int l, int r){ if(l >= r) 阅读全文
posted @ 2023-04-07 21:33 天黑星更亮 阅读(14) 评论(0) 推荐(0)
摘要: link code #include<bits/stdc++.h> using namespace std; typedef long long ll; //注意先除以x后乘以b ll gcd(ll a, ll b){ return b ? gcd(b, a % b) : a; } int main 阅读全文
posted @ 2023-04-07 20:17 天黑星更亮 阅读(31) 评论(0) 推荐(0)
摘要: link code #include<bits/stdc++.h> using namespace std; const int N = 100010; int fa[N], a[N]; int cnt[N]; int find(int x){ if(x != fa[x]) fa[x] = find 阅读全文
posted @ 2023-04-07 19:55 天黑星更亮 阅读(36) 评论(0) 推荐(0)
摘要: link code #include<bits/stdc++.h> using namespace std; const int N = 100010; int a[N],b[N]; int main(){ int n, m; cin >> n >> m; for(int i = 1; i <= n 阅读全文
posted @ 2023-04-07 19:29 天黑星更亮 阅读(13) 评论(0) 推荐(0)
摘要: link code #include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n; int ans = 1, tpr = 0; vector<pair<int,int>>v; int l, r 阅读全文
posted @ 2023-04-07 19:21 天黑星更亮 阅读(17) 评论(0) 推荐(0)
摘要: link code #include<iostream> #include<unordered_map> using namespace std; int main(){ unordered_map<char, int >mp; string s; cin>> s; for(int i = 0; i 阅读全文
posted @ 2023-04-07 17:31 天黑星更亮 阅读(19) 评论(0) 推荐(0)
摘要: link 代码 #include<iostream> using namespace std; const int N = 100010; int cnt[N]; int main(){ int n, k; cin >> n >> k; long long ans = 0; long long su 阅读全文
posted @ 2023-04-07 17:22 天黑星更亮 阅读(28) 评论(0) 推荐(0)
摘要: link 代码 #include<bits/stdc++.h> using namespace std; const int N = 1010; //如果坏人可以到达终点,并且距离终点的距离小于等于 起点到终点的距离,那么必然会相遇 //所以我们从终点出发找起点,在找到起点之前如果到达坏人所在地方, 阅读全文
posted @ 2023-04-07 16:52 天黑星更亮 阅读(21) 评论(0) 推荐(0)