結果

問題 No.1366 交換門松列・梅
コンテスト
ユーザー obakyan
提出日時 2021-02-28 15:37:20
言語 Lua
(LuaJit 2.1.1774638290)
コンパイル:
luajit -b _filename_ a.out
実行:
luajit _filename_
結果
WA  
実行時間 -
コード長 400 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 58 ms
コンパイル使用メモリ 8,228 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2026-04-19 02:16:46
合計ジャッジ時間 1,361 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a = {io.read("*n", "*n", "*n")}
b = {io.read("*n", "*n", "*n")}

function check()
  f = (a[1] < a[2] and a[3] < a[2]) or (a[2] < a[1] and a[2] < a[3])
  g = (b[1] < b[2] and b[3] < b[2]) or (b[2] < b[1] and b[2] < b[3])
  if f and g then
    print("Yes") os.exit()
  end
end

for i = 1, 3 do
  for j = 1, 3 do
    a[i], b[j] = b[j], a[i]
    check()
    a[i], b[j] = b[j], a[i]
  end
end
print("No")
0