Color the fence时间限制:1000 ms  |  内存限制:65535 KB难度:2描述Tom has fallen in love with Mary. Now Tom wants to show hi
原创 2023-05-30 00:00:09
31阅读
/*791. Custom Sort StringS and T are strings composed of lowercase letters. In S, no letter occurs more than once.S was sorted in some custom order previously. We want to permute the characters of T s...
原创 2022-02-03 11:27:04
14阅读
S and T are strings composed of lowercase letters. In S, no lett
原创 2022-08-03 17:08:20
33阅读
感觉自己的答案比较intuitive S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previou
转载 2018-08-28 21:30:00
41阅读
2评论
791. Custom Sort String**https://leetcode.com/problems/custom-sort-string/题目描述S and T are sm o...
原创 2022-05-30 11:06:54
23阅读
给定两个正整数(不含前导 0),计算它们的和。输入格式 共两行,每行包含一个整数。输出格式 共一行,包含所求的和。数据范围 1≤整数长度≤100000 输入样例: 12 23 输出样例: 35#include<iostream>#include<vector>using namespace std;const int N = 1e6+10; vector<int
原创 2022-10-20 10:26:22
51阅读
/*791. Custom Sort StringS and T are strings composed of lowercase letters. In S, no letter occurs more than once.S was sorted in some custom order previously. We want to permute the characters of T s...
原创 2021-07-09 15:07:19
72阅读
#include <iostream> #include <vector> using namespace std; vector<int> add(vector<int> A, vector<int> B) { vector<int> C; int t = 0; for (int i = 0; i ...
转载 2021-08-28 17:54:00
125阅读
2评论
给定两个正整数(不含前导 0),计算它们的和。共两行,每行包含一个
原创 2022-12-17 00:17:09
58阅读
S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want to per
转载 2021-04-08 02:53:00
20阅读
2评论
Bear Limak wants to become the largest of bears, or at least to become larger than his brother Bob. Right now, Limak and Bob weigh a and b respectivel
原创 2021-07-14 15:58:44
176阅读
【题目链接】:http://codeforces.com/contest/791/problem/A【题意】 给你两个数字a和b; a每次乘3,b每次乘2 问你什么时候a第一次大于b 【题解】 傻逼模拟题 【完整代码】#include using namespace std;#...
转载 2017-10-04 18:45:00
69阅读
2评论
原题链接在这里:https://leetcode.com/problems/custom-sort-string/ 题目: S and T are strings composed of lowercase letters. In S, no letter occurs more than once
转载 2019-12-04 08:47:00
130阅读
2评论
DescriptionS and T are strings composed of lowercase letters. In S, no letter occurs more tha
原创 2022-08-11 17:29:23
23阅读
题目链接:​​http://codeforces.com/contest/791/problem/A​​​ 题意:给你一个a,一个b,a每天都乘3,b每天都乘2,问你几天后a超过b 解析:a,b都不大,直接模拟即可#include <cstdio>#include <cstring>#include <algorithm>#include <cmath
原创 2022-11-23 10:04:12
19阅读
order and str are strings composed of lowercase letters. In order, no letter occurs more than once. order was sorted in some custom order previously. ...
转载 2021-07-15 00:58:00
143阅读
2评论
http://codeforces.com/problemset/problem/791/D想了好久也没啥思路 看题解恍然大悟首先要转换思路 正面考虑死路一条 自己还揪着不放。。当k为1时就是个裸题 就是算一下每条边的左右两边各有多少点 可得每条边走了多少次假设在本题中任意两点之间的距离都是k的倍数 没有向上取整 那按上面的方法算完贡献除k即可 除k是因为这里可以一步迈k条边...
原创 2022-06-16 06:25:52
67阅读
题目链接:​​http://codeforces.com/contest/791/problem/C​​​ 题意:给你n和k,表示有n个士兵,下面有n-k+1个字符串,表示对i到i+k-1的士兵的判断,如果i到i+k-1的士兵没有名字重复的,那就是YES,否则NO,让你输出一个符合输入的字符串序列 解析:首先名字的组成很重要:”[A-Z][a-z]{0,9}”,其次是怎么搞,其实先构造出YES
原创 2022-11-23 10:04:02
52阅读
1.引言1.1、动机Internet协议旨在用于数据包交换计算机通信网络的互连系统中。这样的系统被称为“catenet”。 互联网协议提供了从
翻译 2022-01-12 17:07:18
564阅读
【题目链接】:http://codeforces.com/contest/791/problem/D【题意】 你可以从树上的节点一次最多走k条边。 (称为跳一次); 树为无权树; 然后问你任意两点之间的条的次数的和为多少; 【题解】 如果k=1的话; 问题就是求任意两点之间的距离...
转载 2017-10-04 18:45:00
85阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5