結果

問題 No.635 自然門松列
コンテスト
ユーザー 👑 tails
提出日時 2018-01-20 14:50:42
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 650 ms
コード長 567 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 122 ms
コンパイル使用メモリ 25,500 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-11-29 09:18:15
合計ジャッジ時間 1,028 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
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: warning: 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: warning: 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: warning: 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: warning: 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: warning: 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: warning: 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: warning: type defaults to ‘int’ in declaration of ‘y3’ [-Wimplicit-int]
main.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function ‘main’:
main.c:5:9: warning: 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:

ソースコード

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