結果
| 問題 | 
                            No.1823 Tricolor Dango
                             | 
                    
| コンテスト | |
| ユーザー | 
                             horiesiniti
                         | 
                    
| 提出日時 | 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_i
xs=gets.split(" ").map{|e| e.to_i}.reverse
s3=xs.sum
return "No" if s3%3!=0
s2=s3/3*2
s1=s3/3
sum1=0
xs.each{|x|
	m1=s1
	if sum1>=s2 then
		m1=s3-sum1
	end
	return "No" if m1<x
	sum1+=x
}
return "Yes"
end
            
            
            
        
            
horiesiniti