C语言 两个数组+3个for循环解决问题
摘要:解题思路: 用 数组b 的下标记录,我们输入的 数组a 的各个值出现的次数例如 a[6]={ 5, 2, 3, 2, 2, 5 } ;因为 数组a 的最大值是5 ,所以 数组b 的下标最大值也是5那……
编写题解 2909: 直方图
摘要:解题思路:写代码里了注意事项:写代码里了参考代码:#include<stdio.h>int main(){ int n,s=-1,i; scanf("%d",&n); int num……
题解 2909: 直方图
摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;typedef long long ll;ll tong[10000];int n;ll a……
题解 2909: 直方图
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int tong[10002],n,a[10002];int main(){ ci……
编写题解 2909: 直方图(Java)
摘要:解题思路:注意事项:参考代码:package arrLast;
//题目 2909: 直方图
import java.util.Scanner;
public class t_2909 {
……
2909: 直方图 C++
摘要:解题思路:注意事项:const int 常量(不会改变)cnt[a[i]] cnt 数量参考代码:#include<bits/stdc++.h>using namespace std……
题解 2909: 直方图
摘要: #include
using namespace std;
int a,b=0,c,d[20000],e[200000];
int main() {
……