题解列表

筛选

一种可借鉴的麻烦方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a,int b){    return a>b?a:b;}int fun(int *a,int *b,int c……

一种可借鉴的麻烦方法

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){    int t, n, m, i,  j, x, y;    scanf("%d",&t);    for(……

简单数组算法

摘要:解题思路:注意事项:参考代码:int main() { int m, n; while (scanf("%d%d", &n, &m) != EOF) { int a[100]; ……

开关灯 (比较小白)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[5001];//存编号的数组 int arr1[500……

前驱 后驱数组 + 优先队列

摘要:# 思路 ## 如何动态维护这个序列 对于这题我们需要维护一个前驱数组和后驱数组,当选中下标i作为被删除点时候进行如下操作 ![](/image_editor_upload/20230410/2……

2808买房子,使用c++解决

摘要:#include <iostream> using namespace std; int main() {     int N, K;     cin >> N >> K;     do……

python 最小绝对值问题

摘要:解题思路:注意事项:遍历从a[0]开始参考代码:a=list(map(int,input().split()))t=a[0]c=0for i in range(len(a)):    if abs(t……

二级C语言-平均值计算

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){     int a[10];     int i,sum=0,ang=0,temp=0;//定义初始化,及其计……