結果
問題 |
No.351 市松スライドパズル
|
ユーザー |
![]() |
提出日時 | 2016-08-11 23:06:32 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,099 bytes |
コンパイル時間 | 917 ms |
コンパイル使用メモリ | 33,848 KB |
実行使用メモリ | 407,612 KB |
最終ジャッジ日時 | 2024-11-07 11:07:49 |
合計ジャッジ時間 | 6,253 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 TLE * 1 -- * 7 |
コンパイルメッセージ
Main.f90:48:38: 48 | write(*,'(i0)',advance='no'),board(jj,ii) | 1 Warning: Legacy Extension: Comma before i/o item list at (1)
ソースコード
program main implicit none type hand character::RC integer::index end type hand integer::H,W,N,i,j,index character::rc type(hand),allocatable::hands(:) integer,allocatable::board(:,:) integer,parameter::white=0,black=1 read *,H,W read *,N allocate(hands(N)) allocate(board(W,H)) read *,hands do i=1,H do j=1,W board(j,i) = MOD((i+j),2) !ichimatsu end do end do do i=1,N rc = hands(i)%RC index = hands(i)%index+1 select case(rc) case ('R') board(1:W,index) = [board(W,index),board(1:W-1,index)] case ('C') board(index,1:H) = [board(index,H),board(index,1:H-1)] end select end do if(board(1,1).eq.white) then print '(a)',"white" else print '(a)',"black" end if contains subroutine slide_r() integer::ii end subroutine slide_r subroutine state() integer::ii,jj do ii=1,H do jj=1,W-1 write(*,'(i0)',advance='no'),board(jj,ii) end do print '(i0)',board(W,ii) end do print *,"" end subroutine state end program main