結果

問題 No.635 自然門松列
ユーザー tailstails
提出日時 2018-01-20 14:50:42
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 650 ms
コード長 567 bytes
コンパイル時間 661 ms
コンパイル使用メモリ 29,440 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 08:50:18
合計ジャッジ時間 1,544 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 1 ms
6,940 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 1 ms
6,944 KB
testcase_13 AC 1 ms
6,940 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 1 ms
6,940 KB
testcase_17 AC 1 ms
6,940 KB
testcase_18 AC 1 ms
6,940 KB
testcase_19 AC 1 ms
6,944 KB
testcase_20 AC 1 ms
6,944 KB
testcase_21 AC 1 ms
6,944 KB
testcase_22 AC 1 ms
6,940 KB
testcase_23 AC 1 ms
6,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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: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:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |         scanf("%d",&n);
      |         ^~~~~
main.c:5:9: note: i

ソースコード

diff #

#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