摘要:
//加法const int maxn = 520; int a[maxn],b[maxn],c[maxn]; int main(){ string A,B; cin >> A >> B; int len = max(A.length(),B.length()); for(int i = A.leng 阅读全文
posted @ 2023-02-11 11:56
海绵666
阅读(20)
评论(0)
推荐(0)
摘要:
在之前我排列组合思考了一段时间最后得出这样的算法 #include<stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>int cc(int c[], int v);int main(){ int n; int flag = 阅读全文
posted @ 2023-02-11 11:55
海绵666
阅读(54)
评论(0)
推荐(0)
摘要:
本题使用贪心,先排序,再逐个检查一一封装统计 #include <stdio.h>void sort(int* a, int l);int main(){ int sz[30000] = { 0 }; int w, n, i, p, q, o,sum; scanf("%d", &w); scanf( 阅读全文
posted @ 2023-02-11 11:55
海绵666
阅读(31)
评论(0)
推荐(0)
摘要:
在结果冒险和数据冒险中,可以发现,所有的流水线停顿的操作都要从指令执行阶段开始。流水线的前两个阶段,也就是取取指令(IF)和指令译码(ID)阶段,是不需要停顿的。CPU会在流水线里面去取下一条指令,然后进行译码。 取指令和指令译码不会需要遇到任何瓶颈,这是基于一个假设。这个假设就是,所有的指令代码都 阅读全文
posted @ 2023-02-11 11:54
海绵666
阅读(51)
评论(0)
推荐(0)
摘要:
#include<stdio.h>#include <string.h>#include <stdlib.h>int main(){ long long int m, n, sum1 = 0, sum2 = 0; scanf("%lld %lld", &m, &n); for (int i = 1, 阅读全文
posted @ 2023-02-11 11:54
海绵666
阅读(28)
评论(0)
推荐(0)
摘要:
用二分法,求出可能的最大值 #include<stdio.h>#include <string.h>#include <stdlib.h>int a[300010];int cmp(const void* a, const void* b){ return *(int*)a - *(int*)b;} 阅读全文
posted @ 2023-02-11 11:54
海绵666
阅读(20)
评论(0)
推荐(0)
摘要:
int max = Integer.MIN_VALUE; for (int i = 0; i < nums.length; i++) { int sum = 0; for (int j = i; j < nums.length; j++) { sum+=nums[j]; if (sum>max) { 阅读全文
posted @ 2023-02-11 11:53
海绵666
阅读(30)
评论(0)
推荐(0)