摘要: A. Lucky? 给n 个长度6 的数,问前三位和后三位中0 的数量是否相同 #include <bits/stdc++.h> using namespace std; string s; int main(){ int t = read(); while( t -- ){ cin >> s; i 阅读全文
posted @ 2022-05-24 15:37 PHarr 阅读(88) 评论(0) 推荐(0) 编辑
摘要: # 理解 Python中的数据类型 在 Python 中变量的数据类型是动态推断的,并且可以自动进行转换 ```python x = 4 x = "four" ``` 因为Python 是由 C 编写的所以 Python 的整形实际上是 C 中的一个结构体,通过储存一些额外的信息 Python 可以 阅读全文
posted @ 2022-05-22 15:44 PHarr 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 初赛 数圈圈 转化成 16 进制统计一下 #include <bits/stdc++.h> #define ll long long using namespace std; const int N = 23; int n , m ; inline int read() { int x = 0 , 阅读全文
posted @ 2022-04-11 20:56 PHarr 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 递推与递归 AcWing 92. 递归实现指数型枚举 #include<bits/stdc++.h> #define ll long long using namespace std; const int N = 20; int n; bool vis[N]; inline int read() { 阅读全文
posted @ 2022-04-10 13:06 PHarr 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 杂项 错误票据【第四届】【省赛】 #include <bits/stdc++.h> using namespace std; int n; vector<int> a; int main() { int n , m ; string s; cin >> n; getchar(); for( int 阅读全文
posted @ 2022-04-10 13:05 PHarr 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 比赛链接 比例简化 这道题看似很复杂但是因为数据范围很少,所以可以直接枚举分子分母按照题目要求选择即可 #include <bits/stdc++.h> #define ll long long using namespace std; const int N = 1100; double a , 阅读全文
posted @ 2022-04-03 13:33 PHarr 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 分数排名 题目-分数排名 (51nod.com) 把所有的数按照降序排序,每个人的分数在排序后第一次出现的位置就是这个人的排名,顺便说一句哈希的过程和这个很相似,只不过哈希需要把排序后的数组去重 #include <bits/stdc++.h> using namespace std; const 阅读全文
posted @ 2022-03-24 20:31 PHarr 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 1934. 贝茜放慢脚步 一个二路归并,首先要把所有的点分别排序,每次计算当前的是想到下一个时间点还是下一个位置点,选取先到的就好了 #include<bits/stdc++.h> using namespace std; int n; vector<double> a , b; int main( 阅读全文
posted @ 2022-03-19 12:36 PHarr 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 比赛链接 A P6284 [COCI2016-2017#1] Tarifa 水题 #include<bits/stdc++.h> using namespace std; const int N = 1005; int n , a[N] , b[N] , cnt1 , cnt2; set<int> 阅读全文
posted @ 2022-03-15 14:53 PHarr 阅读(43) 评论(0) 推荐(0) 编辑
摘要: Atcoder Beginner Contest 243 部分题解 A - Shampoo 有一个容积为V的水箱,每天有F、M、T三个人用水,分别用a、b、c的水,在不加水的情况下谁先不够用 先取模,然后逐个判断就好 #include<bits/stdc++.h> using namespace s 阅读全文
posted @ 2022-03-14 19:52 PHarr 阅读(69) 评论(0) 推荐(0) 编辑