Submission #207723

# Submission time Handle Problem Language Result Execution time Memory
207723 2020-03-08T17:04:02 Z DodgeBallMan Olivander (COCI18_olivander) C++14
50 / 50
6 ms 376 KB
#include <bits/stdc++.h>

using namespace std;

int n, x[110], y[110];
int main()
{
    scanf("%d",&n);
    for( int i = 0 ; i < n ; i++ ) scanf("%d",&x[i]);
    for( int i = 0 ; i < n ; i++ ) scanf("%d",&y[i]);
    sort( x, x + n ), sort( y, y + n );
    for( int i = 0 ; i < n ; i++ ) {
        if( x[i] > y[i] ) return !printf("NE");
    }
    printf("DA");
    return 0;
}

Compilation message

olivander.cpp: In function 'int main()':
olivander.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
olivander.cpp:9:41: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for( int i = 0 ; i < n ; i++ ) scanf("%d",&x[i]);
                                    ~~~~~^~~~~~~~~~~~
olivander.cpp:10:41: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for( int i = 0 ; i < n ; i++ ) scanf("%d",&y[i]);
                                    ~~~~~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 6 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct