Submission #34228655


Source Code Expand

fun readInts() = readLine()!!.split(' ').map(String::toInt)
fun yn(b: Boolean) = if (b) "Yes" else "No"

fun main() {
	val (N, M, T) = readInts()
	val A = readInts()
	val B = IntArray(A.size)
	repeat(M) {
		val (x, y) = readInts()
		B[x - 2] = y
	}
	var t = T.toLong()
	for ((i, a) in A.withIndex()) {
		t -= a
		if (t <= 0) {
			println("No")
			return
		}
		t += B[i]
	}
	println("Yes")
}

Submission Info

Submission Time
Task B - Explore
User Raysphere
Language Kotlin (1.3.71)
Score 200
Code Size 413 Byte
Status AC
Exec Time 614 ms
Memory 65960 KiB

Compile Error

warning: ATTENTION!
This build uses unsafe internal compiler arguments:

-XXLanguage:+InlineClasses

This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!

Main.kt:5:7: warning: variable 'N' is never used
	val (N, M, T) = readInts()
      ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 26
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt AC 99 ms 36192 KiB
random_01.txt AC 614 ms 65796 KiB
random_02.txt AC 338 ms 58696 KiB
random_03.txt AC 534 ms 62980 KiB
random_04.txt AC 259 ms 50220 KiB
random_05.txt AC 578 ms 65752 KiB
random_06.txt AC 335 ms 58840 KiB
random_07.txt AC 572 ms 65848 KiB
random_08.txt AC 435 ms 61340 KiB
random_09.txt AC 580 ms 65860 KiB
random_10.txt AC 427 ms 61504 KiB
random_11.txt AC 572 ms 65556 KiB
random_12.txt AC 359 ms 60048 KiB
random_13.txt AC 574 ms 65924 KiB
random_14.txt AC 404 ms 61320 KiB
random_15.txt AC 583 ms 65768 KiB
random_16.txt AC 419 ms 61400 KiB
random_17.txt AC 569 ms 65716 KiB
random_18.txt AC 598 ms 65960 KiB
random_19.txt AC 567 ms 65844 KiB
random_20.txt AC 430 ms 61352 KiB
random_21.txt AC 97 ms 36104 KiB
random_22.txt AC 91 ms 36132 KiB
random_23.txt AC 101 ms 36260 KiB
sample_01.txt AC 97 ms 36304 KiB
sample_02.txt AC 95 ms 36392 KiB