自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

原创 查看cuda版本

CMD / powershell>>nvcc --version

2024-04-22 11:15:49 126

原创 Eclipse 转中文 设置语言

右上角 add > "Language" > https://download.eclipse.org/technology/babel/update-site/latest/选择最后字符为 in Chinese 的勾选,点击右下角next等待下载完成,重启Eclipse。上方菜单 help > install new software。

2023-04-10 13:10:50 339

原创 JAVA初见 类与接口的关系

类 implements 接口并实现接口 (implements:v. 使生效;类可以通过子接口实现父接口的功能。接口与接口之间也可以继承。

2023-04-09 10:06:16 114

原创 pSort CF28B

这道题需要我们用到并查集,即可以 合“并” 和”查“询 的多个集合

2022-07-08 09:43:40 160

原创 Polycarpus‘ Dice CF534C 泡利的骰子 详细 翻译

其实这个题目只需要得出两个式子

2022-07-07 16:34:37 105

原创 求一定范围内的质数(打表)

三种求素数的方法

2022-07-05 16:08:36 109

原创 蓝桥杯 日志统计 STL尺取

原题链接 来自蓝桥云课https://www.lanqiao.cn/problems/179/learning/#include <bits/stdc++.h>using namespace std;map<int, int> mp;set<int> st;set<int>::iterator p;pair<int, int> v[100100];int work(){ int i, j, t; int .

2022-04-07 15:18:38 65

原创 蓝桥杯 全球变暖 BFS

原题链接 来自蓝桥云课https://www.lanqiao.cn/problems/178/learning/#include <bits/stdc++.h>using namespace std;int N;int mp[1010][1010], vis[1010][1010] = {0}; // 地图 已访问int ans = 0;int st[1010] = {0}; // 当前序号岛屿留存面积int wayx[5] = {0, 0, -1, 1}; // 方向i

2022-04-07 15:17:04 116

原创 Python 列表 元组 集合 字典

Python 列表 元组 集合 字典 序列

2022-03-26 11:25:01 2775

原创 Weight of the System of Nested Segments CFdiv3C

原题链接 来自Codeforceshttps://codeforces.com/contest/1650/problem/C我的翻译(第一篇翻译,开心)题目在数轴上有m个点,第i个点上有整数的坐标xi和整数的质量wi。所有点的坐标都不同,并且被标记为1至m。如果对于每对i j (1 ≤ i < j ≤ n)都满足 li < lj < rj < ri,则[l1, r1],[l2, r2],…,[ln, rn]被称为嵌套序列系统。或者说,第二段序列完全在第一段序列里,第

2022-03-09 19:47:44 1256 1

原创 多项式输出 (模拟)P1067 [NOIP2009 普及组]

需改进

2022-03-01 15:09:40 78

原创 两只塔姆沃斯牛 The Tamworth Two(暴力)P1518 [USACO2.4]

原题链接 来自洛谷https://www.luogu.com.cn/problem/P1518#include <bits/stdc++.h>using namespace std;int num[15][15] = {0};int Fx, Fy, Cx, Cy; // 坐标int Ff[5][2] = {-1, 0, 0, 1, 1, 0, 0, -1}, Cf[5][2] = {-1, 0, 0, 1, 1, 0, 0, -1};int main(){ int i,.

2022-02-28 21:23:20 552

原创 生活大爆炸版石头剪刀布 (暴力) P1328 [NOIP2014 提高组]

#include <bits/stdc++.h>using namespace std;int sit[5][5] = {0,-1, 1, 1,-1 , 1, 0,-1, 1,-1 ,-1, 1, 0,-1, 1 ,-1,-1, 1, 0, 1 , 1, 1,-1,-1, 0};int a[210], b[210];int main(){ int i, j, t; int n, na, nb; int suma = 0, su.

2022-02-28 20:49:24 74

原创 阶乘之和 (高精)P1009 [NOIP1998 普及组]

原题链接 来自洛谷https://www.luogu.com.cn/problem/P1009#submit#include <bits/stdc++.h>using namespace std;int sum[101] = {0}; // 阶乘和int ans[101] = {0}; // 阶乘int main(){ int i, j, t; int n; scanf("%d", &n); ans[100] = 1; t = 0; for (i = 1.

2022-02-28 20:07:14 99

原创 魔法少女小Scarlet P4924 [1007]

原题链接 来自洛谷https://www.luogu.com.cn/problem/P4924#include <bits/stdc++.h>using namespace std;int num[501][501];int n, m;void putout(){ for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) printf ("%d ", num[i][j]); printf

2022-02-28 20:05:29 158

原创 P1303 A*B Problem(高精)

原题链接 来自洛谷https://www.luogu.com.cn/problem/P1303#include <bits/stdc++.h>using namespace std;int num0[20100];int num1[20100];int num[20100];int n0 = 0, n1 = 0, n = 0;int main(){ int i, j, t; char c; while(~scanf("%c", &c)) { if (

2022-02-27 22:41:39 245

原创 P1601 A+B Problem(高精)

这一题我试了几次都是全WA,我觉得可能有问题,于是到其他OJ上试了下,结果是对的...后来搜了下,找到了这篇解释——主要是因为我们大多使用win环境,而洛谷测评机可能是linux环境,换行符不同( \n 与 \r\n),导致输入字符出了问题。洛谷P1914题解——(本地测试AC但是交题爆零全WA)https://blog.csdn.net/weixin_44686648/article/details/93399267原题链接 来自洛谷https://www.luogu.com.cn/problem

2022-02-27 21:14:23 89

原创 玩具谜题 P1563 [NOIP2016 提高组]

原题链接 来自洛谷https://www.luogu.com.cn/problem/P1563#include <bits/stdc++.h>using namespace std;char name[100100][12];int fward[100100];int main(){ int i, j, t; int n, m; scanf("%d%d", &n, &m); for (i = 0; i < n; i++) scanf("%d

2022-02-27 20:52:09 147

原创 扫雷游戏 P2670 [NOIP2015 普及组]

原题链接 来自洛谷https://www.luogu.com.cn/problem/P2670#include <bits/stdc++.h>using namespace std;int num[110][110] = {0};int main(){ int i, j, t; char c; int n, m; scanf("%d%d", &n, &m); getchar(); for (i = 1; i <= n; i++) { fo

2022-02-27 20:14:51 3510

原创 P1042 [NOIP2003 普及组] 乒乓球

原题链接 来自洛谷https://www.luogu.com.cn/problem/P1042#include <bits/stdc++.h>using namespace std;int num[100100][2] = {0};int main(){ int i, j, t; char c; int w = 0, l = 0; int n = 0; while (scanf("%c", &c)) { if (c == '\n') continue;

2022-02-27 20:00:34 233

原创 B. Restoring Painting CodeForces - 675B

原题链接 位于CodeForceshttps://codeforces.com/problemset/problem/675/B翻译小 V 在玩填数游戏,游戏在 3×3的正方形中进行。9 个格子中的数字都为 1∼n的整数,不同格子中的数字可以相同。 正方形可以划分出4个 2×2的小正方形,这四个正方形中的数之和相同。 如图所示,a, b, c, d 的值是已知的。现在 小 V 想知道,剩下的 5 个数一共有多少种填法。题意及思路可以很容易得到,四周数字的填写...

2022-02-26 21:06:57 2855

原创 C. Hard Process CodeForces - 660C

原题链接 位于CodeForceshttps://codeforces.com/problemset/problem/660/C翻译ff 有一个长为 n的数组 a,并且数组 a 中的元素只有 0 和 1。我们定义这样的 01 数组的价值为其中最长的连续 1 的的长度。ff 为了增加手中数组的价值,学习了把 0 变成 1 的魔法,最多可以释放 k 次。现在他想知道,这个数组的价值最大能够变成多少?题意与思路也就是我们需要找到最长的区间,其中 0 的个数不超过 k。我采用从右向左枚举

2022-02-26 20:22:29 124

原创 区间和(未解决)

区间和(未解决)

2022-02-24 20:40:30 51

原创 CodeForces - B. Berland Crossword

居然没想到可以直接枚举

2022-01-22 21:41:03 337

原创 B. Nick and Array 简单简洁

因为在解决过程中没有看到比较简洁易懂的代码,所以在解决后发个博客给大家康康

2022-01-21 20:55:47 1787

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除