답안 #693854

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
693854 2023-02-03T10:26:58 Z 79brue Izvanzemaljci (COI21_izvanzemaljci) C++17
5 / 100
28 ms 2324 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int n, k;

void solve1();

int main(){
    scanf("%d %d", &n, &k);
    if(k==1) solve1();
}

void solve1(){
    ll xMin = 1e9, xMax = -1e9, yMin = 1e9, yMax = -1e9;
    for(int i=1; i<=n; i++){
        ll x, y;
        scanf("%lld %lld", &x, &y);
        xMin = min(x, xMin), yMin = min(y, yMin);
        xMax = max(x, xMax), yMax = max(y, yMax);
    }
    printf("%lld %lld %lld", xMin, yMin, max({1LL, xMax - xMin, yMax - yMin}));
}

Compilation message

izvanzemaljci.cpp: In function 'int main()':
izvanzemaljci.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |     scanf("%d %d", &n, &k);
      |     ~~~~~^~~~~~~~~~~~~~~~~
izvanzemaljci.cpp: In function 'void solve1()':
izvanzemaljci.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |         scanf("%lld %lld", &x, &y);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 24 ms 2316 KB Output is correct
8 Correct 28 ms 2312 KB Output is correct
9 Correct 24 ms 2252 KB Output is correct
10 Correct 24 ms 2324 KB Output is correct
11 Correct 25 ms 2320 KB Output is correct
# 결과 실행 시간 메모리 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 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 -