結果
問題 | No.607 開通777年記念 |
ユーザー |
|
提出日時 | 2017-12-13 13:41:56 |
言語 | Ruby (3.4.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 24,832 KB |
最終ジャッジ日時 | 2024-12-14 09:57:34 |
合計ジャッジ時間 | 5,564 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 3 TLE * 1 |
コンパイルメッセージ
Main.rb:4: warning: assigned but unused variable - i Syntax OK
ソースコード
N, M = gets.split.map(&:to_i)a = Array.new(N, 0)for i in 0...M dob = gets.split.map(&:to_i)for j in 0...N doa[j] += b[j]ends = 0l = 0for r in 0...N dos += a[r]while l < r && s > 777 dos -= a[l]endif s == 777 thenputs "YES"exitendendendputs "NO"