結果
問題 |
No.1896 Arrays and XOR Procedure 2
|
ユーザー |
![]() |
提出日時 | 2022-04-08 22:51:28 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 482 bytes |
コンパイル時間 | 135 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2024-11-28 13:47:00 |
合計ジャッジ時間 | 20,228 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 6 |
ソースコード
N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) ans = [] while True: a = max(A) i = A.index(a) b = min(B) j = B.index(b) if a < b: break if a == b: ans.append((1, i + 1, j + 1)) A[i] = 0 else: ans.append((2, i + 1, j + 1)) ans.append((1, i + 1, j + 1)) ans.append((2, i + 1, j + 1)) A[i] = b B[j] = a print(len(ans)) for t in ans: print(*t)