fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int k;
  7. scanf("%d",&k);
  8. for(int cs=1; cs<=k; cs++){
  9. int arr[110]={0};
  10.  
  11. int mx = 0;
  12.  
  13. int n;
  14. scanf("%d",&n);
  15. while(n--){
  16. int a;
  17. scanf("%d",&a);
  18. arr[a]++;
  19. if( (arr[a]>arr[mx]) || (arr[a]==arr[mx] && mx<a) ) {
  20. mx = a;
  21. }
  22. }
  23.  
  24. printf("Case %d: %d %d\n",cs,mx,arr[mx]);
  25.  
  26. }
  27.  
  28. return 0;
  29. }
  30.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:24: fatal error: bits/stdc++.h: No such file or directory
compilation terminated.
stdout
Standard output is empty