結果

問題 No.635 自然門松列
ユーザー hiroakie
提出日時 2018-01-30 22:38:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 573 bytes
コンパイル時間 1,490 ms
コンパイル使用メモリ 57,180 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 21:52:31
合計ジャッジ時間 2,322 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
double x[3], y[3];
int n;
int main() {
	cin >> n;
	for (; n > 0; n--) {
		for (int i = 0; i < 3; i++)cin >> x[i]; for (int i = 0; i < 3; i++)cin >> y[i];
		if (!((x[0] >= x[1] && x[1] >= x[2]) || (x[0] <= x[1] && x[1] <= x[2]))) { cout << "YES" << endl; continue; }
		if (y[0] != y[1] && (x[1] - x[0]) / (y[0] - y[1])>=0) { cout << "YES" << endl; continue; }
		if (y[1] != y[2] && (x[2] - x[1]) / (y[1] - y[2])>=0) { cout << "YES" << endl; continue; }
		cout << "NO" << endl;

	}
	return 0;
}
0