【题目链接】:click here~~【题目大意】:题意:求一个字符串,使得它与S,T,相似度相差相等。 【思路】:就是找出S,T之间的相差个数,相差为奇数,输出impossible。输出为偶数的话不同的前半部分输出S后半部分输出T就好了。代码:/* * Problem: CodeForces 545B* Running time: 0MS * Complier:
原创 2022-07-29 16:43:49
69阅读
题目链接:http://codeforces.com/contest/1138/problem/B 题目大意:贼绕口的题目,就是给你两个字符串s1,s2,然后每一个人代表一列,第一列代表技能一每个人是否会,第二列代表技能2是否每个人会。然后1代表当前的技能这个人会,0代表不会。 然后让你安排这个n个
转载 2019-03-11 18:22:00
201阅读
2评论
/* 数组的迭代方法(遍历数组中的每一项做一些特殊的处理) forEach 遍历数组每一项(数组中有多少项,就会触发执行多少次回调函数,每一次把迭代的当前项和当前项的索引传递给回调函数) map 和forEach类似,只不过支持返回值,回调函数中的返回值会把当前迭代的这一项替换掉 find 迭代数据
转载 2020-10-17 14:45:00
48阅读
2评论
When performing an online backup, what is the proper order of the following steps?A. Issue the alter database end backup command.B. Back up the archiv
转载 2017-11-08 14:07:00
48阅读
2评论
传送门 题目大意:n棵树(10^5),坐标xi,高度hi,把这棵树砍到,可以向右倒[xi,xi+hi]被占, 向左倒[xi-hi,xi]被占,必须要倒的坐标没有被占才能倒,不砍倒就xi被占,问最多砍几棵树。 题解: 比赛时没A,现在A了,刚睡醒做题智商还是在线的.... 大多是贪心..我的方法应该不
转载 2019-11-28 08:59:00
56阅读
2评论
A题 做法很明显,就是隔壁连续1和连续2取min,虽然写的比较复杂 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e5+10; int a[N]; queue<int> q1,q2; i
转载 2020-12-16 23:38:00
56阅读
2评论
点击打开链接A. Toy Carstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Susie, thanks to her older
原创 2022-09-07 16:46:13
28阅读
贪心,能倒就倒,能往左就往左实在不行往右 因为倒不倒都只影响下一棵树 大不了下一个不倒还对后面更优。 #include<bits/stdc++.h> using namespace std; #define orz cout<<"lyakioi!!!!!!!!!!!!!!!!!"<<endl inl ...
转载 2021-09-03 18:28:00
17阅读
2评论
CF545C Woodcutters 洛谷传送门 题意翻译 给 n 棵树在一维数轴上的坐标,以及它们的长度。现在要你砍倒 这些树,树可以向左倒也可以向右倒,砍倒的树不能重合、当然 也不能覆盖其他的树原来的位置,现在求最大可以砍倒的树的数 目。 1 ⇐ n ⇐ 105 ; 1 ⇐ x i , h i
转载 2020-11-25 18:13:00
37阅读
2评论
Metric Matrice 时间限制:1000 ms  |  内存限制:65535 KB 难度:1 描述 Given as input a square distance matrix, where a[i][j] is the distance between point i and point j, determine if the distance matrix is
点击打开链接 D. Queue time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little girl Susie went shopping with he
原创 2022-09-07 16:44:42
83阅读
【题目链接】:click here~~【题目大意】:题意】:给一个矩阵表示i行j列某辆车的状态,统计最后没有坏的车代码:/* * Problem: CodeForces - 545A * Running time: 15MS * Complier: G++ * Author: herongwei * Create Time: 7:47 2015/9/17 星期四*统
原创 2022-07-29 16:41:48
116阅读
A. Sushi for Twotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady invited Anna for a dinner to a sushi restaurant. The resta...
原创 2021-09-06 14:45:04
817阅读
The boundary of a binary tree is the concatenation of the root, the left boundary, the leaves ordered from left-to-right, and the reverse order of the
转载 2020-03-03 04:47:00
98阅读
2评论
[题目链接] https://codeforces.com/contest/545/problem/E [算法] 首先求 u 到所有结点的最短路 记录每个节点最短路径上的最后一条边 答案即为以u为根的一棵最短路径生成树 时间复杂度 : O(NlogN) [代码]
转载 2018-10-05 21:26:00
58阅读
目录: cv2.threshold cv2.distanceTransform cv2.cvtColor 1. cv2.threshold opencv: 阈值处理(cv2.threshold) 探究(图示+源码) 官方说明文档 OpenCV 中cv2.threshold详解,(大白话版) open ...
转载 2021-08-13 15:06:00
530阅读
2评论
A. Sushi for Twotime limit per test1 secondmemory limit per test2
原创 2022-03-14 09:55:36
264阅读
题目链接:http://codeforces.com/contest/1138A. Sushi for Two解题思路:利用"缩点"变成1,2,1,
原创 2023-05-31 09:34:25
85阅读
很久不用了,是我最早开始写博客的平台://ww
原创 2022-03-15 11:22:15
189阅读
【题目链接】:click here~~【题目大意】:有n个人,每个人都有一个等待时间,如果对于当前的人来说总等待时间超过自己的等待时间,那么这个人就会失望,问换一下顺序,使失望的人最少,问最多有多少个人不失望。 【思路】:排一下序然后加然后与当前的比较。如此。。代码:/* * Problem: CodeForces 545D* Running time: 46MS
原创 2022-07-29 16:41:52
7阅读
  • 1
  • 2
  • 3
  • 4
  • 5