結果
問題 | No.1082 XORのXOR |
ユーザー |
![]() |
提出日時 | 2024-11-03 21:40:10 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 370 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 37,804 KB |
実行使用メモリ | 32,148 KB |
最終ジャッジ日時 | 2024-11-03 21:40:12 |
合計ジャッジ時間 | 2,449 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 03 NOV 2024 09:40:10 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.014
ソースコード
(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (a (make-array n :element-type 'integer)) (res 0)) (dotimes (i n) (setf (aref a i) (read))) (loop for i below (1- n) do (loop for j from (1+ i) below n do (setf res (max res (logxor (aref a i) (aref a j)))))) (format t "~d~%" res))) (main)