Submission #743950

# Submission time Handle Problem Language Result Execution time Memory
743950 2023-05-18T06:41:46 Z salmon Izvanzemaljci (COI21_izvanzemaljci) C++14
0 / 100
1 ms 232 KB
#include <bits/stdc++.h>
using namespace std;
vector<pair<int,int>> v;
int N,K;
int a,b;

int main(){
    scanf(" %d",&N);
    scanf(" %d",&K);

    int smalla,smallb;
    int biga,bigb;

    scanf(" %d",&smalla);
    scanf(" %d",&smallb);
    biga = smalla;
    bigb = smallb;

    for(int i = 1; i < N; i++){
        scanf(" %d",&a);
        scanf(" %d",&b);

        smalla = min(smalla,a);
        biga = max(biga,a);
        
        smallb = min(smallb,b);
        bigb = max(bigb,b);
    }
    
    int l = max(biga - smalla, bigb - smallb);
    
    printf("%d %d %d",smalla,smallb,l);

}

Compilation message

izvanzemaljci.cpp: In function 'int main()':
izvanzemaljci.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |     scanf(" %d",&N);
      |     ~~~~~^~~~~~~~~~
izvanzemaljci.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |     scanf(" %d",&K);
      |     ~~~~~^~~~~~~~~~
izvanzemaljci.cpp:14:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |     scanf(" %d",&smalla);
      |     ~~~~~^~~~~~~~~~~~~~~
izvanzemaljci.cpp:15:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |     scanf(" %d",&smallb);
      |     ~~~~~^~~~~~~~~~~~~~~
izvanzemaljci.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |         scanf(" %d",&a);
      |         ~~~~~^~~~~~~~~~
izvanzemaljci.cpp:21:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |         scanf(" %d",&b);
      |         ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Integer 0 violates the range [1, 2*10^9]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Integer 0 violates the range [1, 2*10^9]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Integer 0 violates the range [1, 2*10^9]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 232 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -