Submission #1238696

#TimeUsernameProblemLanguageResultExecution timeMemory
1238696JerTeam Coding (EGOI24_teamcoding)C++20
12 / 100
11 ms1344 KiB
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 1e5 + 5;

int n, k;
int lang[MAXN];
int pre[MAXN];

int main()
{
    scanf("%d%d", &n, &k);

    int res = 0;
    for (int i = 0; i < n; i++)
        scanf("%d", &lang[i]), pre[lang[i]]++, res = max(res, pre[lang[i]]);

    int par;
    for (int i = 0; i < n - 1; i++)
        scanf("%d", &par);

    printf("%d 0\n", res);

    return 0;
}

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |     scanf("%d%d", &n, &k);
      |     ~~~~~^~~~~~~~~~~~~~~~
Main.cpp:17:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |         scanf("%d", &lang[i]), pre[lang[i]]++, res = max(res, pre[lang[i]]);
      |         ~~~~~^~~~~~~~~~~~~~~~
Main.cpp:21:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |         scanf("%d", &par);
      |         ~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...