SMU

SMU Summer 2023 Contest Round 2

# [SMU Summer 2023 Contest Round 2](https://codeforces.com/group/L9GOcnr1dm/contest/450889) ## [A. Treasure Hunt](https://codeforces.com/group/L9GOcnr ......
Contest Summer Round 2023 SMU

SMU 2023 Spring 题单 第二周 贪心

# Saruman's Army 首先对序列排序,然后逐个考虑覆盖,如果要覆盖当前的点,则标记点越靠后越好,所有向后找$R$,选择最靠后的标记,然后从标记点开始在向后找$R$也是被标记过的,直接跳过 ```cpp #include #include using namespace std; int ......
Spring 2023 SMU

SMU Summer 2023 Contest Round 1

# [SMU Summer 2023 Contest Round 1](https://codeforces.com/group/L9GOcnr1dm/contest/450888) ## [A. The Contest](https://codeforces.com/group/L9GOcnr1d ......
Contest Summer Round 2023 SMU

SMU Spring 2023 Contest Round 7

A. Programming Contest 签到题. 输入输出读完应该就懂了: 从y1枚举到y2,若枚举的年份不在停办年份里则答案加一 void solve() { int n,m; cin >> n; vector<int> a(N),year(N); cin >> m; for(int i = ......
Contest Spring Round 2023 SMU

SMU Spring 2023 Contest Round 6

E. Expenditure Reduction 从左右往右找到包含B字符的最近位置,然后从这个位置有从右到左找回去找到包含完所有B字符的位置,这个区间就是答案 #include <bits/stdc++.h> #define inf 0x3f3f3f3f #define endl '\n' #de ......
Contest Spring Round 2023 SMU

SMU Spring 2023 Contest Round 5(2023 (ICPC) Jiangxi Provincial Contest -- Official Contest)

题目链接 Problem A. Drill Wood to Make Fire S * V >= n即可 #include<bits/stdc++.h> #define int long long #define endl '\n' using namespace std; const int N ......
Contest 2023 Provincial Official Jiangxi

SMU Spring 2023 Contest Round 4(第 21 届上海大学程序设计联赛 春季赛)

A. Antiamuny wants to learn binary search 签到题. #include <map> #include <set> #include <cmath> #include <queue> #include <stack> #include <cstdio> #inc ......
程序设计 联赛 Contest 程序 Spring

SMU Spring 2023 Trial Contest Round 11

A. The Text Splitting 题意:给出字符串长度,给出p和q两种切割方式,任选其中一种,把字符串分割输出结果。 题解:先进行判断,p和q是否能整个的分割n,利用p和q的函数关系判断(见代码),再计算有几个p几个q,再进行输出即可 void solve() { cin >> n >> ......
Contest Spring Round Trial 2023

2023 SMU RoboCom-CAIP 选拔赛

A. 小斧头 $O(N^3)$ 20 points 暴力枚举左右端点,然后暴力求区间最值 #include <bits/stdc++.h> using namespace std; #define int long long int read(){...} int32_t main() { int ......
选拔赛 RoboCom-CAIP RoboCom 2023 CAIP

SMU Spring 2023 Trial Contest Round 10

A. Remove Duplicates #include <bits/stdc++.h> //#define inf 0x3f3f3f3f #define endl '\n' #define int long long using namespace std; const int N = 2e3 ......
Contest Spring Round Trial 2023

SMU Spring 2023 Contest Round 1

SMU Spring 2023 Contest Round 1 B - Contest Preparation 思路:特判下m大于n的情况,只有make后才能validate #include<bits/stdc++.h> using namespace std; typedef pair<int, ......
Contest Spring Round 2023 SMU

SMU Spring 2023 Trial Contest Round 9

A. Wrong Subtraction 在k次操作里, 将n的最后一位数减1,如果是0就去掉,模拟一下就好了. #include <bits/stdc++.h> //#define inf 0x3f3f3f3f #define endl '\n' #define int long long usi ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 10

SMU Spring 2023 Trial Contest Round 10 A - Remove Duplicates #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pair<strin ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 10

A. Remove Duplicates #include <bits/stdc++.h> using namespace std; #define int long long int read() { int x = 0, f = 1, ch = getchar(); while ((ch < ' ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 9

SMU Spring 2023 Trial Contest Round 9 A - Wrong Subtraction #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pair<string ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 9

A. Wrong Subtraction #include <bits/stdc++.h> using namespace std; int32_t main() { int n, k; cin >> n >> k; while (k--) { if (n % 10 == 0) n /= 10; e ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 4 (4.4)

SMU Spring 2023 Trial Contest Round 4 (^_^) A小石的图形 思路:pi=acos(-1) #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; const int N=1 ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 1(6/8)

SMU Spring 2023 Trial Contest Round 1(6/8) A. Prepend and Append Prepend and Append 只需考虑给定字符串两端是否符合10或01即可,双指针从两端模拟即可。 #include <iostream>using namesp ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 1

A. Prepend and Append 如果两段字符不同就可以删掉,如果不能删了就是最初的字符串 #include <bits/stdc++.h> using namespace std; void solve() { int n; string s; cin >> n >> s; int l ......
Contest Spring Round Trial 2023

SMU Spring 2023 Trial Contest Round 1

A. Prepend and Append 用ans记录n的值,然后双指针从前后判断是否一个为0一个为1,是的话则ans-2,否则退出循环即可. #include<bits/stdc++.h> using namespace std; int t,n; char a[2010]; int main( ......
Contest Spring Round Trial 2023
共50篇  :2/2页 首页上一页2下一页尾页