2021年9月1日

1049 数列的片段和 (20 point(s))

摘要: // 暴力超时 #include <bits/stdc++.h> using namespace std; int main() { // 截取连续片段 计算片段和 // 一种方法 顺序循环从第一位开始 // 用一个片段和变量记录之前所走过变量的和 并累加到结果 double n, part, su 阅读全文

posted @ 2021-09-01 17:52 Atl212 阅读(64) 评论(0) 推荐(0)

1048 数字加密 (20 point(s))

摘要: // 错误魔改后正确版 #include <bits/stdc++.h> using namespace std; int main() { // 加密整数A 加密序列B string A, B, str = "0123456789JQK" ; cin >> A >> B; // 高位补零 // 获 阅读全文

posted @ 2021-09-01 16:03 Atl212 阅读(119) 评论(0) 推荐(0)

1047 编程团体赛 (20 point(s))

摘要: #include <bits/stdc++.h> using namespace std; int main() { int n, max = 0; map<int, int> result; cin >> n; while(n--){ int num, i, score; // 队伍编号1-100 阅读全文

posted @ 2021-09-01 12:19 Atl212 阅读(15) 评论(0) 推荐(0)

1046 划拳 (15 point(s))

摘要: #include <bits/stdc++.h> using namespace std; int main() { int n, sayA, handA, sayB, handB, loseA = 0, loseB = 0; cin >> n; while(n--){ cin >> sayA >> 阅读全文

posted @ 2021-09-01 11:57 Atl212 阅读(37) 评论(0) 推荐(0)

1045 快速排序 (25 point(s))

摘要: #include <bits/stdc++.h> #define INF 0x3f3f3f3f using namespace std; int main() { // 取主元 左小右大 判断主元个数 int n, a[100000], b[2][100000], max = 0, min = IN 阅读全文

posted @ 2021-09-01 11:35 Atl212 阅读(64) 评论(0) 推荐(0)

导航