Submission #6516108


Source Code Expand

let input = readLine()!.characters.split(" ").map{Double(String($0))!}
var ans = "NO"
for _ in 0..<Int(readLine()!)! {
    let xy = readLine()!.characters.split(" ").map{Double(String($0))!}
    if sqrt(pow(xy[0]-input[0],2)+pow(xy[1]-input[1],2)) + sqrt(pow(input[2]-xy[0],2)+pow(input[3]-xy[1],2)) <= input[4]*input[5] {
        ans = "YES"
    }
}
print(ans)

Submission Info

Submission Time
Task C - 浮気調査
User Pine
Language Swift (swift-2.2-RELEASE)
Score 0
Code Size 369 Byte
Status CE

Compile Error

./Main.swift:5:8: error: use of unresolved identifier 'sqrt'
    if sqrt(pow(xy[0]-input[0],2)+pow(xy[1]-input[1],2)) + sqrt(pow(input[2]-xy[0],2)+pow(input[3]-xy[1],2)) <= input[4]*input[5] {
       ^~~~
./Main.swift:5:13: error: use of unresolved identifier 'pow'
    if sqrt(pow(xy[0]-input[0],2)+pow(xy[1]-input[1],2)) + sqrt(pow(input[2]-xy[0],2)+pow(input[3]-xy[1],2)) <= input[4]*input[5] {
            ^~~
./Main.swift:5:35: error: use of unresolved identifier 'pow'
    if sqrt(pow(xy[0]-input[0],2)+pow(xy[1]-input[1],2)) + sqrt(pow(input[2]-xy[0],2)+pow(input[3]-xy[1],2)) <= input[4]*input[5] {
                                  ^~~
./Main.swift:5:60: error: use of unresolved identifier 'sqrt'
    if sqrt(pow(xy[0]-input[0],2)+pow(xy[1]-input[1],2)) + sqrt(pow(input[2]-xy[0],2)+pow(input[3]-xy[1],2)) <= input[4]*input[5] {
                                                           ^~~~
./Main.swift:5:65: error: use of unresolved identifier 'pow'
    if sqrt(pow(xy[0]-input[0],2)+pow(xy[1]-input[1],2)) + s...