Submission #744148

# Submission time Handle Problem Language Result Execution time Memory
744148 2023-05-18T08:35:39 Z salmon Izvanzemaljci (COI21_izvanzemaljci) C++14
5 / 100
45 ms 2072 KB
#include <bits/stdc++.h>
using namespace std;
vector<pair<int,int>> v;
vector<pair<int,int>> o;
int N,K;
int a,b;
int st[400100];

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

    int smalla,smallb;
    int biga,bigb;

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

        v.push_back(make_pair(a,b));
        o.push_back(make_pair(b,a));
    }

    sort(v.begin(),v.end());
    sort(o.begin(),o.end());

    int l = max(1,max(v[v.size() - 1].first - v[0].first, o[o.size() - 1].first - o[0].first));

    printf("%d %d %d",v[0].first,o[0].first,l);

}

Compilation message

izvanzemaljci.cpp: In function 'int main()':
izvanzemaljci.cpp:13:9: warning: unused variable 'smalla' [-Wunused-variable]
   13 |     int smalla,smallb;
      |         ^~~~~~
izvanzemaljci.cpp:13:16: warning: unused variable 'smallb' [-Wunused-variable]
   13 |     int smalla,smallb;
      |                ^~~~~~
izvanzemaljci.cpp:14:9: warning: unused variable 'biga' [-Wunused-variable]
   14 |     int biga,bigb;
      |         ^~~~
izvanzemaljci.cpp:14:14: warning: unused variable 'bigb' [-Wunused-variable]
   14 |     int biga,bigb;
      |              ^~~~
izvanzemaljci.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf(" %d",&N);
      |     ~~~~~^~~~~~~~~~
izvanzemaljci.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf(" %d",&K);
      |     ~~~~~^~~~~~~~~~
izvanzemaljci.cpp:17:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |         scanf(" %d",&a);
      |         ~~~~~^~~~~~~~~~
izvanzemaljci.cpp:18:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |         scanf(" %d",&b);
      |         ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 240 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 45 ms 1972 KB Output is correct
8 Correct 44 ms 1992 KB Output is correct
9 Correct 44 ms 2072 KB Output is correct
10 Correct 41 ms 2016 KB Output is correct
11 Correct 42 ms 1984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 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 212 KB Unexpected end of file - int64 expected
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 -