結果

問題 No.635 自然門松列
コンテスト
ユーザー 👑 tails
提出日時 2018-01-20 14:50:42
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 567 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 71 ms
コンパイル使用メモリ 25,396 KB
最終ジャッジ日時 2026-02-22 00:41:39
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.c:3:1: warning: data definition has no type or storage class
    3 | n;x1;x2;x3;y1;y2;y3;
      | ^
main.c:3:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:3:3: warning: data definition has no type or storage class
    3 | n;x1;x2;x3;y1;y2;y3;
      |   ^~
main.c:3:3: error: type defaults to 'int' in declaration of 'x1' [-Wimplicit-int]
main.c:3:6: warning: data definition has no type or storage class
    3 | n;x1;x2;x3;y1;y2;y3;
      |      ^~
main.c:3:6: error: type defaults to 'int' in declaration of 'x2' [-Wimplicit-int]
main.c:3:9: warning: data definition has no type or storage class
    3 | n;x1;x2;x3;y1;y2;y3;
      |         ^~
main.c:3:9: error: type defaults to 'int' in declaration of 'x3' [-Wimplicit-int]
main.c:3:12: warning: data definition has no type or storage class
    3 | n;x1;x2;x3;y1;y2;y3;
      |            ^~
main.c:3:12: error: type defaults to 'int' in declaration of 'y1' [-Wimplicit-int]
main.c:3:12: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
main.c:3:15: warning: data definition has no type or storage class
    3 | n;x1;x2;x3;y1;y2;y3;
      |               ^~
main.c:3:15: error: type defaults to 'int' in declaration of 'y2' [-Wimplicit-int]
main.c:3:18: warning: data definition has no type or storage class
    3 | n;x1;x2;x3;y1;y2;y3;
      |                  ^~
main.c:3:18: error: type defaults to 'int' in declaration of 'y3' [-Wimplicit-int]
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #define NO  {puts("NO");continue;}
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaratio

ソースコード

diff #
raw source code

#define NO  {puts("NO");continue;}
#define YES {puts("YES");continue;}
n;x1;x2;x3;y1;y2;y3;
main(){
	scanf("%d",&n);
	while(n--){
		scanf("%d%d%d%d%d%d",&x1,&x2,&x3,&y1,&y2,&y3);
		x1-=x2; x3-=x2; y1-=y2; y3-=y2;
		if(x1==x3&&y1==y3) NO;
		if((x1<0||!x1&&y1<0)&&(x3<0||!x3&&y3<0)) YES;
		if((x1>0||!x1&&y1>0)&&(x3>0||!x3&&y3>0)) YES;
		if((y1<0||!y1&&x1<0)&&(y3<0||!y3&&x3<0)) YES;
		if((y1>0||!y1&&x1>0)&&(y3>0||!y3&&x3>0)) YES;
		if(!y1||!y3) NO;
		if(x1<0&&y1<0) NO;
		if(x1>0&&y1>0) NO;
		if(x3>0&&y3>0) NO;
		if(x3<0&&y3<0) NO;
		if(x1*y3==x3*y1) NO;
		YES;
	}
}
0