上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 69 下一页

2025年11月23日

1008. Elevator (20)

摘要: #include "stdafx.h" #include <iostream> using namespace std; int main() { int n; scanf("%d", &n); int former = 0, i, res = n * 5, cur; for(i = 1; i <= 阅读全文

posted @ 2025-11-23 16:52 王景迁 阅读(6) 评论(0) 推荐(0)

1007. Maximum Subsequence Sum (25)

摘要: #include "stdafx.h" #include <iostream> using namespace std; int num[10010]; int main() { int n; scanf("%d", &n); int i, flag = 0; for(i = 1; i <= n; 阅读全文

posted @ 2025-11-23 16:52 王景迁 阅读(2) 评论(0) 推荐(0)

1006. Sign In and Sign Out (25)

摘要: #include "stdafx.h" #include <iostream> #include <string.h> using namespace std; int main() { int n; scanf("%d", &n); int i, j, hour[2], second[2], mi 阅读全文

posted @ 2025-11-23 16:51 王景迁 阅读(2) 评论(0) 推荐(0)

1005. Spell It Right (20)

摘要: #include "stdafx.h" #include <iostream> #include <string.h> using namespace std; int main() { char a[110]; gets(a); int sum = 0, i, len = strlen(a); f 阅读全文

posted @ 2025-11-23 16:51 王景迁 阅读(4) 评论(0) 推荐(0)

1004. Counting Leaves (30)

摘要: #include "stdafx.h" #include <iostream> #include <queue> using namespace std; vector<int> v[110]; queue<int> q; int vis[110], first = 1; void bfs() { 阅读全文

posted @ 2025-11-23 16:50 王景迁 阅读(3) 评论(0) 推荐(0)

1003. Emergency (25)

摘要: #include "stdafx.h" #include <iostream> #include <vector> using namespace std; struct node { int next, length; }; vector<node> v[510]; int team[510], 阅读全文

posted @ 2025-11-23 16:49 王景迁 阅读(3) 评论(0) 推荐(0)

1002. A+B for Polynomials (25)

摘要: #include "stdafx.h" #include <iostream> #include <map> using namespace std; int main() { int n1; scanf("%d", &n1); map<int, double> id; int i, a; doub 阅读全文

posted @ 2025-11-23 16:49 王景迁 阅读(2) 评论(0) 推荐(0)

1001. A+B Format (20)

摘要: #include "stdafx.h" #include <iostream> #include <algorithm> #include <queue> #include <stdlib.h> #include <string.h> using namespace std; int main() 阅读全文

posted @ 2025-11-23 16:48 王景迁 阅读(4) 评论(0) 推荐(0)

2025年11月21日

gorm使用事务的2种方式

摘要: 方式1:基本事务(常用) err := db.Transaction(func(tx *gorm.DB) error { // 执行事务操作 return nil }) 方式2:手动事务 // 开始事务 tx := db.Begin() defer func() { if r := recover( 阅读全文

posted @ 2025-11-21 08:57 王景迁 阅读(9) 评论(0) 推荐(0)

2025年11月15日

Linux正常访问github

摘要: https://tool.chinaz.com/dns/github.com搜索github.com,选择TTL最小的站点,增加到/etc/hosts中。 原来 现在 阅读全文

posted @ 2025-11-15 10:57 王景迁 阅读(11) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 69 下一页

导航