Submission #469710

# Submission time Handle Problem Language Result Execution time Memory
469710 2021-09-01T16:00:46 Z Karabasan Cipele (COCI18_cipele) C++17
18 / 90
59 ms 2852 KB
#include <bits/stdc++.h>

using namespace std;
int n,m;
int sol[100005];
int sag[100005];
int mx;
int main()
{
    scanf("%d%d",&n,&m);
    for(int i=0;i<n;i++)
        scanf("%d",&sol[i]);
    for(int i=0;i<m;i++)
        scanf("%d",&sag[i]);
    sort(sol,sol+n);
    sort(sag,sag+m);
    if(n==m)
    {
        for(int i=0;i<n;i++)
        {
            mx=max(mx,abs(sol[i]-sag[i]));
        }
        printf("%d",mx);
    }
    return 0;
}

Compilation message

cipele.cpp: In function 'int main()':
cipele.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d%d",&n,&m);
      |     ~~~~~^~~~~~~~~~~~~~
cipele.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%d",&sol[i]);
      |         ~~~~~^~~~~~~~~~~~~~
cipele.cpp:14:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |         scanf("%d",&sag[i]);
      |         ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 29 ms 2528 KB Output is correct
2 Correct 59 ms 2852 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 45 ms 2800 KB Output is correct
2 Correct 45 ms 2764 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 372 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 312 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 38 ms 2336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 40 ms 2536 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 2236 KB Output isn't correct
2 Halted 0 ms 0 KB -