답안 #744136

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
744136 2023-05-18T08:31:23 Z salmon Izvanzemaljci (COI21_izvanzemaljci) C++14
0 / 100
1 ms 212 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++){
        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].second));

    printf("%d %d %d",smalla,smallb,l);

}

Compilation message

izvanzemaljci.cpp: In function 'int main()':
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);
      |     ~~~~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Unexpected end of file - int64 expected
2 Halted 0 ms 0 KB -