QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#227500 | #2174. Which Planet is This?! | TWTP_TCTF# | WA | 365ms | 25616kb | C++14 | 906b | 2023-10-27 16:45:53 | 2023-10-27 16:45:54 |
Judging History
answer
#include <bits/stdc++.h>
#define tle ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define ld long double
#define sz(a) (int)(a.size())
using namespace std;
const int N = 2e5 + 5, M = 475260;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
ld EPS = 1e-5;
int main() {
tle
int n;
cin >> n;
vector<pair<ld, ld>> a(n), b(n);
for (auto &it: a) cin >> it.first >> it.second;
for (auto &it: b) cin >> it.first >> it.second;
std::sort(a.begin(), a.end());
std::sort(b.begin(), b.end());
ld aa=a[0].second,bb=b[0].second;
for (int i = 0; i < n; ++i) {
a[i].second -= aa;
b[i].second -= bb;
if (abs(a[i].first - b[i].first) < EPS && abs(a[i].second - b[i].second) < EPS)
continue;
cout << "Different\n";
return 0;
}
cout << "Same\n";
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3656kb
input:
3 10 0 20 40 30 -15 40 -15 20 0 30 40
output:
Different
result:
ok single line: 'Different'
Test #2:
score: -100
Wrong Answer
time: 365ms
memory: 25616kb
input:
359998 -0.0045 96.8638 -0.0045 -79.2284 -0.0045 -50.4113 -0.0045 -79.0394 -0.0045 -24.9710 -0.0045 -142.9880 -0.0045 50.6344 -0.0045 125.9464 -0.0045 -17.3039 -0.0045 42.3454 -0.0045 130.6138 -0.0045 -106.4363 -0.0045 -95.9378 -0.0045 90.7312 -0.0045 75.7615 -0.0045 -66.9785 -0.0045 -81.0752 -0.0045...
output:
Different
result:
wrong answer 1st lines differ - expected: 'Same', found: 'Different'