結果
問題 | No.1823 Tricolor Dango |
ユーザー |
![]() |
提出日時 | 2023-07-04 09:22:58 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 225 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-07-18 05:50:48 |
合計ジャッジ時間 | 4,457 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 25 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - n Syntax OK
ソースコード
def f()n=gets.to_ixs=gets.split(" ").map{|e| e.to_i}.reverses3=xs.sumreturn "No" if s3%3!=0s2=s3/3*2s1=s3/3sum1=0xs.each{|x|m1=s1if sum1>=s2 thenm1=s3-sum1endreturn "No" if m1<xsum1+=x}return "Yes"end