結果

問題 No.199 星を描こう
ユーザー 沙耶花沙耶花
提出日時 2021-11-04 07:22:32
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 618 bytes
コンパイル時間 4,371 ms
コンパイル使用メモリ 264,764 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-04 05:54:00
合計ジャッジ時間 5,845 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
4,380 KB
testcase_13 WA -
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 WA -
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint1000000007;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000000000000
	

int main(){	
	
	vector<pair<int,int>> xy(5);
	rep(i,5)cin>>xy[i].first>>xy[i].second;
	sort(xy.begin(),xy.end());
	
	do{
		bool f = true;
		rep(i,5){
			int a = i;
			int b = (i+1)%5;
			if(xy[a].first*xy[b].second - xy[b].first*xy[a].second<=0)f = false;
			
		}
		if(f){
			cout<<"YES"<<endl;
			return 0;
		}
	}
	while(next_permutation(xy.begin(),xy.end()));
	cout<<"NO"<<endl;
	return 0;
	
}
0