beginner atcoder contest 247

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

AtCoder Beginner Contest 246

AtCoder Beginner Contest 246 D 题意 求一个$x\geq n$ 使得$x=a^3+a^2b+ab^2+b^3$且$n\leq10^{18}$ 思路 变形 $x=(a+b)(a^2+b^2)$ ,那么a、b的范围在1e6 从大到小枚举每个a,那么每个符合情况的b的最小值一 ......
Beginner AtCoder Contest 246

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

[AtCoder] B - Counting Grids

The key observation is that there is always at most 1 cell that violates both conditions. Proof: if x violates both conditions, that means all other n ......
Counting AtCoder Grids

The 2023 ICPC Asia Hong Kong Regional Programming Contest

The 2023 ICPC Asia Hong Kong Regional Programming Contest A. TreeScript 给你一个根,让你构造一棵树,每个节点被创造的时候必须知道它的父节点的地址和需要寄存器存放当前节点的地址,现在给定你每个节点之间的关系,并且现在根节点已经被创 ......
Programming Regional Contest 2023 ICPC

AtCoder Beginner Contest 141

AtCoder Beginner Contest 141 D - Powerful Discount Tickets 贪心 + 堆 #include <bits/stdc++.h> #define ll long long using namespace std; const int N = 1e5 ......
Beginner AtCoder Contest 141

AtCoder Beginner Contest 294

题解报告 基本的一些理解和问题都在注释中 A:Filter //水题 #include <cstdio> #include <algorithm> #include <cstring> #include <iostream> using namespace std; int main(void) { ......
Beginner AtCoder Contest 294
共1027篇  :35/35页 首页上一页35下一页尾页