上一页 1 ··· 13 14 15 16 17

2024年3月3日

VJ结营测试

摘要: A 这题其实自己画一下图可以发现当奇数行为每行都为W,偶数行为W与R交替出现,就可以得到满足题意的图形了。 点击查看代码 #include<bits/stdc++.h> using namespace std; void solve() { int n; cin>>n; for(int i=1;i< 阅读全文

posted @ 2024-03-03 15:30 swj2529411658 阅读(41) 评论(0) 推荐(0)

2024年3月1日

2024 蓝桥杯模拟赛3(div1+div2)

摘要: 2024 蓝桥杯模拟赛3(div1+div2) P8834 [传智杯 #3 决赛] 序列 简单的模拟,数据范围很小,暴力即可 点击查看代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N= 阅读全文

posted @ 2024-03-01 16:52 swj2529411658 阅读(69) 评论(0) 推荐(0)

2024年2月25日

0219-0223部分题解和思路

摘要: VJ第五次选拔赛 A题 Triple Metre 这一题的本质就是寻找题给的字符串中的子串,看有没有与其符合的子串,虽然题目给的很吓人T=10^5个oxx,但是注意The length of S is between 1 and 10 (inclusive)这句话”,也就是我们让T=10个以上的ox 阅读全文

posted @ 2024-02-25 02:53 swj2529411658 阅读(41) 评论(0) 推荐(0)

2024年2月17日

0209-0217校赛部分题解

摘要: SMU Winter 2024 Round #3 (Div.2) 对于自己比较有价值的题目是 D题 https://codeforces.com/gym/102897/problem/D?mobile=true J题 https://codeforces.com/gym/102897/problem 阅读全文

posted @ 2024-02-17 03:04 swj2529411658 阅读(32) 评论(0) 推荐(0)

2024年2月3日

0129-0203部分校赛题解复盘

摘要: vj第一场 A题 https://codeforces.com/gym/103480/problem/A 该题让我们可以从回文串的特点入手,即两个相同的字母便可增加长度2,所以并不用思考该回文串要如何排序出来,而是看有多少对相同的字母,使用map<char,int>来记录字母出现的次数,再计算可以除 阅读全文

posted @ 2024-02-03 19:12 swj2529411658 阅读(30) 评论(0) 推荐(0)

2024年1月27日

有关字符串的技巧模板

摘要: 先列一下string 的常见操作 s.find(x) 用于查找并返回子字符串或字符在s中第一次出现的位置,若找不到返回std::npos; 若为s.find(x,1)即为从第一个位置开始往后查找 点击查看代码 std::string str = "Hello World"; std::cout << 阅读全文

posted @ 2024-01-27 03:50 swj2529411658 阅读(30) 评论(0) 推荐(0)

2024年1月21日

牛客小白月赛86数组段数

摘要: 链接:https://ac.nowcoder.com/acm/contest/73450/C`` 来源:牛客网 vector<int> a(n+1) 2 2 3 1 3 3 vector <int> s(n+1) 1 1 2 3 4 4 理解这个就可以理解这个代码了 点击查看代码 int main( 阅读全文

posted @ 2024-01-21 00:53 swj2529411658 阅读(23) 评论(0) 推荐(0)

2024年1月20日

牛客小白月赛86-水平考试

摘要: 链接:https://ac.nowcoder.com/acm/contest/73450/B 来源:牛客网 点击查看代码 #include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string a,b; for 阅读全文

posted @ 2024-01-20 21:26 swj2529411658 阅读(28) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17

导航