Submission #743950

#TimeUsernameProblemLanguageResultExecution timeMemory
743950salmonIzvanzemaljci (COI21_izvanzemaljci)C++14
0 / 100
1 ms232 KiB
#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 (stderr)

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 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...