結果
| 問題 | No.607 開通777年記念 | 
| コンテスト | |
| ユーザー |  💕💖💞 | 
| 提出日時 | 2018-02-16 15:20:37 | 
| 言語 | Kotlin (2.1.0) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 612 bytes | 
| コンパイル時間 | 13,279 ms | 
| コンパイル使用メモリ | 437,572 KB | 
| 実行使用メモリ | 140,324 KB | 
| 最終ジャッジ日時 | 2024-11-20 13:51:18 | 
| 合計ジャッジ時間 | 29,689 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 6 TLE * 4 | 
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) { 
         ^
            
            ソースコード
fun main(args: Array<String>) { 
  val (ws, n) = readLine()!!.split(" ").map { it.toInt() }
  val xs = (1..ws).map { 0 }.toMutableList()
  
  var check = false
  for( nn in (1..n) ) { 
    readLine()!!.split(" ").map { it.toInt() }.mapIndexed { index, x ->
      xs[index] += x
      
      if( check == false ) {
        scan@for( s in (0..xs.size-1) ) { 
          for( e in (s..xs.size-1) ) { 
            if( xs.slice(s..e).sum() == 777) {
              check = true
              continue@scan
            }
          }
        }
      }
    }
  }
  if(check) 
    println("YES")
  else
    println("NO")
}
            
            
            
        