結果

問題 No.2451 Redistribute Integers
ユーザー tailstails
提出日時 2023-09-01 21:44:50
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 475 bytes
コンパイル時間 1,547 ms
コンパイル使用メモリ 25,188 KB
実行使用メモリ 7,088 KB
最終ジャッジ日時 2023-09-01 21:45:00
合計ジャッジ時間 2,277 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 0 ms
4,380 KB
testcase_04 AC 8 ms
7,088 KB
testcase_05 AC 0 ms
4,376 KB
testcase_06 AC 0 ms
4,380 KB
testcase_07 AC 0 ms
4,380 KB
testcase_08 AC 0 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 0 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 10 ms
6,176 KB
testcase_14 AC 9 ms
6,832 KB
testcase_15 AC 4 ms
4,380 KB
testcase_16 AC 0 ms
4,376 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 8 ms
6,272 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 0 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:16:4: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
    write(1,"No",2);
    ^~~~~
main.c:17:4: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration]
    _exit(0);
    ^~~~~
main.c:17:4: warning: incompatible implicit declaration of built-in function ‘_exit’
main.c:21:2: warning: incompatible implicit declaration of built-in function ‘_exit’
  _exit(0);
  ^~~~~

ソースコード

diff #

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

#define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);})
#define rd_skip() while(*rp++>=48)
#define rd() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define rd_signed() ({int _s=*rp=='-'&&++rp,_v=rd();_s?-_v:_v;})

int main(){
	rd_init();
	int n=rd();
	int b=rd_signed();
	while(*rp){
		int a=rd_signed();
		if((a-b)%n){
			write(1,"No",2);
			_exit(0);
		}
	}
	write(1,"Yes",3);
	_exit(0);
}
0