結果

問題 No.1935 Water Simulation
ユーザー tailstails
提出日時 2022-05-13 21:27:46
言語 Perl
(5.38.2)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 198 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 5,372 KB
最終ジャッジ日時 2023-09-29 09:54:03
合計ジャッジ時間 2,220 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 5 ms
5,168 KB
testcase_03 AC 5 ms
5,172 KB
testcase_04 AC 5 ms
5,228 KB
testcase_05 AC 6 ms
5,200 KB
testcase_06 AC 6 ms
5,144 KB
testcase_07 AC 5 ms
5,172 KB
testcase_08 AC 5 ms
5,244 KB
testcase_09 AC 6 ms
5,108 KB
testcase_10 AC 6 ms
5,244 KB
testcase_11 AC 5 ms
5,072 KB
testcase_12 AC 6 ms
5,048 KB
testcase_13 AC 5 ms
5,140 KB
testcase_14 AC 6 ms
5,044 KB
testcase_15 AC 5 ms
5,168 KB
testcase_16 AC 5 ms
5,096 KB
testcase_17 AC 6 ms
5,140 KB
testcase_18 AC 6 ms
5,048 KB
testcase_19 AC 6 ms
5,348 KB
testcase_20 AC 6 ms
5,044 KB
testcase_21 AC 6 ms
5,136 KB
testcase_22 AC 5 ms
5,108 KB
testcase_23 AC 6 ms
5,060 KB
testcase_24 AC 6 ms
5,140 KB
testcase_25 AC 6 ms
5,204 KB
testcase_26 AC 6 ms
5,256 KB
testcase_27 AC 6 ms
5,140 KB
testcase_28 AC 6 ms
5,080 KB
testcase_29 AC 6 ms
5,052 KB
testcase_30 AC 6 ms
5,052 KB
testcase_31 AC 6 ms
5,056 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

(@v[0..3],$n)=glob<>;
@a=($v[0],0,0,0);
$n=$n%88if$n>88;
for$i(0..$n-1){
	$a[$i+1&3]+=$a[$i&3],$a[$i&3]=0;
	$a[$i&3]=$a[$i+1&3]-$v[$i+1&3],$a[$i+1&3]=$v[$i+1&3]if$a[$i+1&3]>$v[$i+1&3];
}
print"@a";
0