結果
| 問題 |
No.635 自然門松列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-06 20:18:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,656 bytes |
| コンパイル時間 | 787 ms |
| コンパイル使用メモリ | 96,036 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 14:22:56 |
| 合計ジャッジ時間 | 2,169 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 23 |
ソースコード
#include<iostream>
#include <algorithm>
#include <functional>
#include<vector>
#include<math.h>
#include <assert.h>
#include<bitset>
#include<string>
#include <deque>
#include<queue>
#include <iomanip>
#include<map>
#include <random>
#include<type_traits>
#include<stack>
#include <sstream>
#include <limits>
#include <numeric>
#include<string.h>
#include<set>
using namespace std;
#define ll long long int
ll mod = 1000000007;
//typedef vector<int> V;
//typedef vector<V> VV;
//typedef vector<VV> VVV;
int main() {
int n;
double a, b, c, A, B, C;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a >> b >> c >> A >> B >> C;
if (B - A == 0 && C - B == 0) {
if (a < b&&c < b && !(A == C && a == c)) {
cout << "Yes" << endl;
}
else cout << "No" << endl;
}
else if (B - A == 0) {
if (a < b && !(A == C && a == c)) {
cout << "Yes" << endl;
}
else cout << "No" << endl;
}
else if (C - B == 0) {
if (c < b && !(A == C && a == c)) {
cout << "Yes" << endl;
}
else cout << "No" << endl;
}
else {
if (!(A == C && a == c) && !(B == C && b == c)) {
if ((B - A) < 0 && ( B-C) > 0) {
if ((b - c) / (C - B)<(a - b) / (B - A) ) {
cout << "Yes" << endl;
}
else cout << "No" << endl;
}
else if ((B - A) > 0 && ( B-C) < 0) {
if ((c - b) / (B - C) > (b - a) / (A - B)){
cout << "Yes" << endl;
}
else cout << "No" << endl;
}
else if ((B - A) <0 && ( B-C) < 0) {
if (b - c > 0 && b - a > 0) {
cout << "Yes" << endl;
}
else cout << "No" << endl;
}else{
cout << "Yes" << endl;
}
}
else cout << "No" << endl;
}
}
}