6 条题解

  • 1
    @ 2022-3-20 20:47:10
    #include <stdio.h>
    #include <string.h>
    #include <math.h>
    #include <iostream>
    using namespace std;
    int a [10000];
    int main()
    {
    	int n ;
    	cin >> n;
    	int maxx = 0;
    	for(int i = 0,x ;i < n ;i++)
    	{	
    		double num;
    		cin >> num;
    		num = num * 100;
    		x = num;
    		a[x]++;
    		maxx = max(maxx , a[x]);
    	}
    	for(int i = 1 ; i <= 10000 ; i++)
    	{
    		if(a[i] == maxx)
    		{
    			double j = i;
    			printf("%.2lf %d\n",j/100.0 , a[i]);
    		}
    	}
    }
    
    • 0
      @ 2025-7-17 10:17:58
      using namespace std;
      int main(){
          int n,y=0,a[10005]={};
          double x;
      	cin>>n;
      	for(int i=1;i<=n;i++){
      		cin>>x;
      		x=x*100;
      		a[int(x)]++;
      	}
      	for(int i=0;i<=10000;i++){
      		if(a[i]>y){
      			y=a[i];
      		}
      	}
      	for(int i=0;i<=10000;i++){
      		if(a[i]==y){
      			printf("%.2lf",i/100.0);
      			cout<<" "<<y<<endl; 
      		}
      	}
      } 
      
      
      • 0
        @ 2025-7-17 10:16:47

        #include<bits/stdc++.h> using namespace std; int main(){ int n,y=0,a[10005]={}; double x; cin>>n; for(int i=1;i<=n;i++){ cin>>x; x=x100; a[int(x)]++; } for(int i=0;i<=10000;i++){ if(a[i]>y){ y=a[i]; } } for(int i=0;i<=10000;i++){ if(a[i]==y){ printf("%.2lf",i/100.0); cout<<" "<<y<<endl; } } } *

        • 0
          @ 2023-2-2 12:24:04
          #include <iostream>
          #include <stack>
          #include <cmath>
          #include <vector>
          #include <string.h>
          #include <queue>
          #include <stdio.h>
          #include <iomanip>
          #include <cstdio>
          #include <algorithm>
          #define int long long
          using namespace std;
          const int N = 1e4 + 10;
          const int INF = 0x3f3f3f3f;
          int a[N];
          signed main()
          {
          	int n, maxx = -INF;
              cin >> n;
              for(int i = 1; i <= n; i++)
              {
                  double x;
                  cin >> x;
                  x *= 100;
                  int xx = x;
                  a[xx]++;
                  maxx = max(maxx, a[xx]);
              }
              //cout << maxx << endl;
              for(int i= 1; i <= 10000; i++)
              {
                  if(a[i] == maxx)
                  {
                      //一种奇怪的东西
                      int len1, len2;
                      len1 = i / 100;
                      len2 = i % 100;
                      cout << len1 << "." << len2 << " " << maxx << endl;
                      //一种奇怪的东西
                  }
              }
          	return 0;
          }
          
          • -2
            @ 2024-1-22 21:08:15

            #include using namespace std; int main(){ for(int i=1;i<=514514;i++){ cout<<"1111111111111111111111111111111111111111111111111111111111111"; } }

            • -2
              @ 2024-1-22 21:08:06

              #include using namespace std; int main(){ for(int i=1;i<=514514;i++){ cout<<"1111111111111111111111111111111111111111111111111111111111111"; } }

              • 1

              信息

              ID
              999
              时间
              1000ms
              内存
              128MiB
              难度
              5
              标签
              递交数
              378
              已通过
              147
              上传者