結果

問題 No.1366 交換門松列・梅
ユーザー MaboyMaboy
提出日時 2021-06-20 20:56:43
言語 Swift
(5.10.0)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 1,892 ms
コンパイル使用メモリ 125,696 KB
実行使用メモリ 8,452 KB
最終ジャッジ日時 2023-09-05 01:34:51
合計ジャッジ時間 3,388 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,232 KB
testcase_01 AC 3 ms
8,388 KB
testcase_02 AC 3 ms
8,388 KB
testcase_03 AC 3 ms
8,344 KB
testcase_04 AC 3 ms
8,284 KB
testcase_05 AC 3 ms
8,204 KB
testcase_06 AC 3 ms
8,300 KB
testcase_07 AC 3 ms
8,216 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 4 ms
8,340 KB
testcase_11 AC 3 ms
8,236 KB
testcase_12 AC 3 ms
8,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let a = readLine()!.split(separator: " ").map{Int($0)!}
let b = readLine()!.split(separator: " ").map{Int($0)!}
var z = 1 == 1
for i in 0...2{
    for j in 0...2{
        var c = a
        var d = b
        (c[i],d[j]) = (d[j],c[i])
        if Set(c).count != c.count{continue}
        if Set(d).count != d.count{continue}
        if c.max() == c[1] || d.min() == d[1]{
            z = 1 == 0
        }
    }
}
print(z ? "No" : "Yes")
0