Submission #6957236


Source Code Expand

Copy
let S = readLine()!.characters.map{$0}
let N = S.count
var ans = "NO"
for i in 0..<N {
  for j in i..<N {
    if String(S[0..<i]+S[j..<N]) == "keyence" {
      ans = "YES"
    }
  }
}
print(ans)

Submission Info

Submission Time
Task B - KEYENCE String
User Pine
Language Swift (swift-2.2-RELEASE)
Score 200
Code Size 204 Byte
Status
Exec Time 108 ms
Memory 4080 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt, s3.txt, s4.txt
All 200 / 200 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, s1.txt, s2.txt, s3.txt, s4.txt
Case Name Status Exec Time Memory
01.txt 49 ms 4080 KB
02.txt 24 ms 768 KB
03.txt 4 ms 768 KB
04.txt 46 ms 768 KB
05.txt 60 ms 768 KB
06.txt 4 ms 768 KB
07.txt 29 ms 768 KB
08.txt 59 ms 768 KB
09.txt 10 ms 768 KB
10.txt 44 ms 768 KB
11.txt 108 ms 768 KB
12.txt 16 ms 768 KB
13.txt 4 ms 768 KB
14.txt 4 ms 768 KB
s1.txt 4 ms 768 KB
s2.txt 4 ms 768 KB
s3.txt 4 ms 768 KB
s4.txt 4 ms 768 KB