Submission #1043985

# Submission time Handle Problem Language Result Execution time Memory
1043985 2024-08-05T05:44:55 Z 사상 최고의 알고리즘(#11062) Team Coding (EGOI24_teamcoding) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int cnt[100005];
int n,k;

int main() {
    scanf("%d %d",&n,&k);
    int ret=0;
    for(int i=0;i<n;i++) {
        int x;
        scanf("%d",&x);
        cnt[x]++;
        ret=max(ret,cnt[x]);
    }
    printf("%d",ret);
    return 0;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |     scanf("%d %d",&n,&k);
      |     ~~~~~^~~~~~~~~~~~~~~
Main.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%d",&x);
      |         ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -