結果

問題 No.3042 拡大コピー
ユーザー asmin
提出日時 2025-02-28 22:21:36
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 2,381 bytes
コンパイル時間 3,275 ms
コンパイル使用メモリ 325,260 KB
実行使用メモリ 10,804 KB
最終ジャッジ日時 2025-03-01 07:39:04
合計ジャッジ時間 4,283 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma region header

#include <immintrin.h>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfenv>
#include <cfloat>
#include <chrono>
#include <cinttypes>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <ios>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <streambuf>
#include <string>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
struct Init{Init(){std::cin.tie(0); ios::sync_with_stdio(false); cout << setprecision(20) << fixed;}} init;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define all(x) begin((x)), end((x))
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define uq(v) v.erase(unique(begin(v), end(v)), end(v))
template<class T> using pq = priority_queue<T>;
template<class T> using pq_g = priority_queue<T, vector<T>, greater<T>>;
template<class T> bool chmax(T &a, const T &b){if(a < b){a = b; return 1; } return 0;}
template<class T> bool chmin(T &a, const T &b){if(a > b){a = b; return 1; } return 0;}
constexpr ll INF = 2e18;
constexpr int inf = 1e9;
constexpr ld eps = 1e-15;
constexpr int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int dy[8] = {0, 1 ,0, -1, 1, -1, 1, -1};



#pragma endregion header



int main(){
    int N; cin >> N;
    vector<pair<ll, ll>> x(N), y(N);
    for(int i = 0; i < N; ++i){
        ll a, b; cin >> a >> b;
        x[i] = mp(a, b);
    }
    for(int i = 0; i < N; ++i){
        ll a, b; cin >> a >> b;
        y[i] = mp(a, b);
    }
    sort(all(x));
    sort(all(y));
    int a = x[0].first - x[1].first;
    int b = x[0].second - x[1].second;
    int c = y[0].first - y[1].first;
    int d = y[0].second - y[1].second;
    if(a != 0 && c != 0){
        cout << (ld)c / a << "\n";
    }else{
        cout << (ld)d / b << "\n";
    }
}
0