結果
| 問題 | 
                            No.1831 Parasol
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-11-15 12:58:28 | 
| 言語 | Nim  (2.2.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,494 bytes | 
| コンパイル時間 | 6,212 ms | 
| コンパイル使用メモリ | 77,324 KB | 
| 実行使用メモリ | 9,728 KB | 
| 最終ジャッジ日時 | 2024-11-15 12:58:40 | 
| 合計ジャッジ時間 | 10,549 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 1 | 
| other | WA * 19 | 
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'algorithm' [UnusedImport] /home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 27) Warning: imported and not used: 'tables' [UnusedImport] /home/judge/data/code/Main.nim(1, 83) Warning: imported and not used: 're' [UnusedImport] /home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'sets' [UnusedImport] /home/judge/data/code/Main.nim(1, 76) Warning: imported and not used: 'bitops' [UnusedImport] /home/judge/data/code/Main.nim(1, 53) Warning: imported and not used: 'sugar' [UnusedImport] /home/judge/data/code/Main.nim(1, 59) Warning: imported and not used: 'heapqueue' [UnusedImport] /home/judge/data/code/Main.nim(1, 69) Warning: imported and not used: 'deques' [UnusedImport]
ソースコード
import algorithm,sequtils,tables,math,sets,strutils,sugar,heapqueue,deques,bitops,re,streams
let outstream=newFileStream(stdout)
proc input():string{.inline.}=stdin.readLine
proc print(args:varargs[string,`$`]):void{.inline.}=stdout.writeLine(args)
proc debug(args:varargs[string,`$`]):void{.inline.}=stderr.writeLine(args)
proc flush():void{.inline.}=flush(outstream)
proc `%`(x:int,y:int):int{.inline.}=((x mod y)+y) mod y
proc `//`(x:int,y:int):int{.inline.}=((x)-(x%y)) div y
proc `%=`(x:var int,y:int):void{.inline.}=x=x%y
proc `//=`(x:var int,y:int):void{.inline.}=x=x//y
proc `**`(x:int,y:int):int{.inline.}=x^y
proc `**`(x:float,y:int):float{.inline.}=x^y
proc `^`(x:int,y:int):int{.inline.}=x xor y
proc `&`(x:int,y:int):int{.inline.}=x and y
proc `|`(x:int,y:int):int{.inline.}=x or y
proc `<<`(x:int,y:int):int{.inline.}=x shl y
proc `>>`(x:int,y:int):int{.inline.}=x shr y
proc `~`(x:int):int{.inline.}=not x
proc `^=`(x:var int,y:int):void{.inline.}=x=x xor y
proc `&=`(x:var int,y:int):void{.inline.}=x=x and y
proc `|=`(x:var int,y:int):void{.inline.}=x=x or y
proc `<<=`(x:var int,y:int):void{.inline.}=x=x shl y
proc `>>=`(x:var int,y:int):void{.inline.}=x=x shr y
var N=input().parseInt
var ans=newSeq[seq[int]](N*2-1)
for i in 0..<N-1:
    for j in 0..<N*2-1-i:
        ans[j].add(N*2-1-i)
var cnt=0
for i in 2..N:
    for j in 0..<2:
        ans[cnt].add(i)
        cnt+=1
    for j in 0..<i-2:
        ans[N*2-2-j].add(i)
ans[N*2-2].add(1)
for a in ans:
    print a.join" "