結果

問題 No.1801 Segment Game
ユーザー tailstails
提出日時 2023-01-30 18:56:07
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 536 ms
コンパイル使用メモリ 25,256 KB
実行使用メモリ 4,576 KB
最終ジャッジ日時 2023-09-12 16:42:15
合計ジャッジ時間 1,800 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,380 KB
testcase_01 AC 4 ms
4,536 KB
testcase_02 AC 5 ms
4,552 KB
testcase_03 AC 4 ms
4,472 KB
testcase_04 AC 5 ms
4,548 KB
testcase_05 AC 4 ms
4,544 KB
testcase_06 AC 4 ms
4,556 KB
testcase_07 AC 4 ms
4,532 KB
testcase_08 AC 5 ms
4,528 KB
testcase_09 AC 4 ms
4,576 KB
testcase_10 AC 0 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:22:2: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
  write(1,wbuf,wp-wbuf);
  ^~~~~
main.c:23:2: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration]
  _exit(0);
  ^~~~~
main.c:23:2: warning: incompatible implicit declaration of built-in function ‘_exit’

ソースコード

diff #

#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")

#define getrp() ({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);})
#define rd_skip() while(*rp++>=48)
#define rd() ({long _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})

typedef unsigned long ulong;
char wbuf[1<<25];

int main(){
	char*rp=getrp();
	char*wp=wbuf;
	rd_skip();
	while(*rp){
		long h=rd(); h*=h;
		long w=rd(); w*=w;
		long d=rd(); d*=d;
		*wp++=h+(w&1)>d&w+(h&1)>d?'S':'N';
		*wp++='\n';
	}
	write(1,wbuf,wp-wbuf);
	_exit(0);
}
0