結果

問題 No.611 Day of the Mountain
ユーザー tailstails
提出日時 2017-12-22 12:10:04
言語 cLay
(20240104-1)
結果
CE  
実行時間 -
コード長 553 bytes
コンパイル時間 2,756 ms
コンパイル使用メモリ 163,188 KB
最終ジャッジ日時 2023-09-18 23:50:21
合計ジャッジ時間 3,376 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp:588:6: error: conflicting declaration ‘mint* w’
 mint*w=u+(1<<17);
      ^
main.cpp:583:5: note: previous declaration as ‘int w’
 int w;
     ^
main.cpp: In function ‘int main()’:
main.cpp:623:12: error: invalid types ‘int[int]’ for array subscript
         w[b]=(ty<tx||ty>tx&&b0==b1||ty==tx&&b0<=b1)*(v[b]+(ty>tx||ty==tx&&!b1)*v[b^1<<x]);
            ^
main.cpp:625:14: error: invalid types ‘int[int]’ for array subscript
           w[b]+=(w[b-(1<<x)]+w[b])*8;
              ^
main.cpp:625:28: error: invalid types ‘int[int]’ for array subscript
           w[b]+=(w[b-(1<<x)]+w[b])*8;
                            ^
main.cpp:625:33: error: invalid types ‘int[int]’ for array subscript
           w[b]+=(w[b-(1<<x)]+w[b])*8;
                                 ^
main.cpp:628:15: error: no matching function for call to ‘swap(mint*&, int&)’
       swap(v,w);
               ^
In file included from /usr/include/c++/8/complex:45,
                 from /usr/include/c++/8/ccomplex:39,
                 from /usr/include/c++/8/x86_64-redhat-linux/bits/stdc++.h:52,
                 from main.cpp:4:
/usr/include/c++/8/sstream:797:5: note: candidate: ‘template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&)’
     swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
     ^~~~
/usr/include/c++/8/sstream:797:5: note:   template argument deduction/substitution failed:
main.cpp:628:15: note:   mismatched types ‘std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>’ and ‘mint*’
       swap(v,w);
               ^
In file included from /usr/include/c++/8/complex:45,
                 from /usr/include/c++/8/ccomplex:39,
                 from /usr/include/c++/8/x86_64-redhat-linux/bits/stdc++.h:52,
                 from main.cpp:4:
/usr/include/c++/8/sstream:804:5: note: candidate: ‘template<class _CharT, cl

ソースコード

diff #

#define MD 201712111

int h,w,t[320];
char a[320][320];
mint u[1<<18],*v=u,*w=u+(1<<17);

{
	rd(h,w,a(h));
	if(w>h){
		rep(y,w)rep(x,y)swap(a[y][x],a[x][y]);
		swap(w,h);
	}
	u[0]=1;
	rep(y,h)rep(x,w){
		int ty=(y?t[x]:1<<30);
		int tx=(x?t[x-1]:1<<30);
		rep(b,1<<w){
			bool b0=1&b>>x;
			bool b1=1&b>>x-1;
			w[b]=(ty<tx||ty>tx&&b0==b1||ty==tx&&b0<=b1)*(v[b]+(ty>tx||ty==tx&&!b1)*v[b^1<<x]);
			if(b0&&a[y][x]=='?'){
				w[b]+=(w[b-(1<<x)]+w[b])*8;
			}
		}
		swap(v,w);
		t[x]=(x+y?min(ty,tx):0)+a[y][x]%16%14;
	}
	wt(t[w-1]);
	wt(sum(v(1<<w-1)));
}
0