摘要: 传送门 A Two Elevators 注意读题,读懂题目即可,比较两部电梯到达1楼所需要的时间。 #include<bits/stdc++.h> #define int long long using namespace std; const int N = 200010; int n; void 阅读全文
posted @ 2023-05-05 09:00 north_h 阅读(19) 评论(0) 推荐(0)
摘要: 传送门 A A-characteristic 题意就是让我们构造一个序列,是的满足i<j的条件下a[i]*a[j]的值为1的个数满足题目要求,我们其实只用关心1和-1的个数即可,通过个数来计算出有多少对1和-1满足题意,满足题意输出YES结果return即可,如果到最后都不能,就输出NO #incl 阅读全文
posted @ 2023-04-28 09:00 north_h 阅读(19) 评论(0) 推荐(0)
摘要: 传送门 A Remove Duplicates 记录每个数最后出现的位置,最后按照顺序输出即可 #include<bits/stdc++.h> #define int long long using namespace std; const int N = 200010; int a[N]; int 阅读全文
posted @ 2023-04-26 09:00 north_h 阅读(12) 评论(0) 推荐(0)
摘要: 传送门 A Wrong Subtraction #include<bits/stdc++.h> #define int long long using namespace std; const int N = 200010; int a[N], b[N]; void solve() { int n, 阅读全文
posted @ 2023-04-25 09:00 north_h 阅读(10) 评论(0) 推荐(0)
摘要: 传送门 L1-1 自动编程 #include<iostream> #include<cstdio> using namespace std; int main(){ int a; cin>>a; printf("print(%d)",a); return 0; } L1-2 太神奇了 #includ 阅读全文
posted @ 2023-04-17 09:00 north_h 阅读(19) 评论(0) 推荐(0)
摘要: 传送门 A Yura's New Name 签到题,怪我没有皇后看样例子,意思就是把有^和_组成的字符串加若干个字符使得全部都是笑脸(^^或^_^),所一我们遍历一下字符串,把连着都是两个的地方加上^即可,最后处理一下开头和结尾就行 #include<bits/stdc++.h> #define i 阅读全文
posted @ 2023-04-17 09:00 north_h 阅读(16) 评论(0) 推荐(0)
摘要: 题目链接 本场比赛还行,就是要提高思考的速度,速度太慢导致排名靠后了,继续加油,早日绿名。 A #include<iostream> #include<cstring> #include<algorithm> #include<map> #include<set> using namespace s 阅读全文
posted @ 2023-04-13 09:00 north_h 阅读(23) 评论(0) 推荐(0)
摘要: 题目链接 总体来说还是很考思维的,cf的题目质量非常不错。 A Insert Digit 也不知道为啥,比赛搞半天,其实就是找到比给的数小的位置的时候将它放在这个位置的前面,如果没有找到就放在最后面即可。 #include<iostream> #include<cstring> #include<a 阅读全文
posted @ 2023-04-12 09:00 north_h 阅读(20) 评论(0) 推荐(0)
摘要: A 小d和答案修改 就简单的签到题 #include<iostream> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < s.size(); i++) { if (s[i] >= 'a' && s[i 阅读全文
posted @ 2023-04-09 09:00 north_h 阅读(11) 评论(0) 推荐(0)
摘要: 题目链接 A 小石的图形 简单题,但要注意PI的精度问题我是直接使用计算器,也可以使用acos(-1)或者使用c++里面的定义好的M_PI #include<iostream> #include<cstring> #include<algorithm> #include<cstdio> using 阅读全文
posted @ 2023-04-07 09:00 north_h 阅读(16) 评论(0) 推荐(0)