結果
問題 | No.2306 [Cherry 5th Tune C] ウソツキタマシイ |
ユーザー |
![]() |
提出日時 | 2023-07-03 10:20:57 |
言語 | Ruby (3.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 192 bytes |
コンパイル時間 | 411 ms |
コンパイル使用メモリ | 11,476 KB |
実行使用メモリ | 22,348 KB |
最終ジャッジ日時 | 2023-09-24 07:21:29 |
合計ジャッジ時間 | 10,054 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 80 ms
22,348 KB |
testcase_01 | AC | 77 ms
15,144 KB |
testcase_02 | AC | 142 ms
19,712 KB |
testcase_03 | AC | 88 ms
15,608 KB |
testcase_04 | AC | 159 ms
21,304 KB |
testcase_05 | AC | 171 ms
21,704 KB |
testcase_06 | AC | 177 ms
21,984 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
コンパイルメッセージ
Main.rb:7: warning: assigned but unused variable - n Main.rb:7: warning: assigned but unused variable - m Syntax OK
ソースコード
def f() return gets.split(" ").map{|e| e.to_i} end def g(xs) return xs.map{|e| e**2}.sum end n,m=f() xs=f() q=gets.to_i q.times{ c,k,d=f() xs[c-1],xs[d-1]=xs[c-1]-k,xs[d-1]+k puts g(xs) }