上一页 1 2 3 4 5 6 7 ··· 23 下一页
摘要: The 2020 ICPC Asia Shenyang Regional Programming Contest Northeastern University(SMU 2024 ICPC 网络赛选拔赛2) D. Journey to Un'Goro 思路 队友写得,没看。 代码 #include 阅读全文
posted @ 2024-10-07 16:09 Ke_scholar 阅读(17) 评论(0) 推荐(0) 编辑
摘要: SMU Autumn 2024 Personal Round 1 前言 拉了,后面有空再补补。 A. Lex String 思路 排序后取最小,记录连续取了几个,不要超过 \(k\) 个即可。 代码 #include <bits/stdc++.h> using namespace std; usin 阅读全文
posted @ 2024-10-07 15:29 Ke_scholar 阅读(11) 评论(0) 推荐(0) 编辑
摘要: Nordic Collegiate Programming Contest (NCPC 2021)(SMU 2024 ICPC网络赛选拔赛) A Antenna Analysis 思路 原式可拆成: \[(x_i-x_j)-c(i-j)=(x_i-c\cdot i)+(-x_j+c\cdot j) 阅读全文
posted @ 2024-10-07 15:08 Ke_scholar 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 偷的 struct myhash { static uint64_t fxn(uint64_t x) { x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049 阅读全文
posted @ 2024-10-07 03:23 Ke_scholar 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 自适应辛普森法 double a, b, c, d, l, r; const double eps = 1e-8; double F(double x) { //需要积分的公式 return (c * x + d) / (a * x + b); } double simpson(double l, 阅读全文
posted @ 2024-10-02 12:32 Ke_scholar 阅读(14) 评论(0) 推荐(0) 编辑
摘要: SMU Autumn 2024 Team Round 3(The 2024 ICPC Latin America Championship) D. DiviDuelo 思路 队友写得,分类讨论,不过他上了点黑科技,但是貌似 \(\sqrt{n}\) 也可以处理。 代码 #include<bits/s 阅读全文
posted @ 2024-09-25 00:08 Ke_scholar 阅读(29) 评论(0) 推荐(1) 编辑
摘要: Codeforces Round 970 (Div. 3) A. Sakurako's Exam 思路 直接枚举即可。 代码 #include <bits/stdc++.h> using namespace std; using i64 = long long; void solve() { int 阅读全文
posted @ 2024-09-06 01:33 Ke_scholar 阅读(107) 评论(0) 推荐(1) 编辑
摘要: 2024 暑假友谊赛 4 前言 所有的 Z 类型属于自动取模模板,由于太长就不放了。 A - 加减图 洛谷 - T488353 思路 考虑没有操作的时候,\(in_i,out_i\) 代表 \(i\) 的入度和出度,通过拓扑dp可计算出每个点作为终点的简单路径数,设 \(dp1_i\) 表示以 \( 阅读全文
posted @ 2024-08-22 23:21 Ke_scholar 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 思路 先说结论:若 \((a-1)\otimes(b-1)\otimes (c-1)\ne 0\) 则先手必胜(\(\otimes\) 代表异或)。 假设 \(a\le b \le c\),那么有 \(a+b\ge c\),则有 \((a-1)+(b-1)\ge (c-1)\)。 令 \(x = ( 阅读全文
posted @ 2024-08-19 01:28 Ke_scholar 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 2024 暑假友谊赛 5 A - 喷泉 CodeForces - 799C 思路 方案只有三种,一种是都用金币,一种是都用钻石,还有一种是一座金币一座钻石。 可以先枚举采用金币的,一边枚举的过程中,用线段树维护剩下的金币数可以建造的温泉美观度最大值,注意要建造两座才可以算进答案中。 枚举完金币的可以 阅读全文
posted @ 2024-08-19 01:27 Ke_scholar 阅读(6) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 23 下一页