結果

問題 No.611 Day of the Mountain
コンテスト
ユーザー 👑 tails
提出日時 2017-12-22 12:10:04
言語 cLay
(20250308-1 + boost 1.89.0)
コンパイル:
clayc _filename_
実行:
./a.out
結果
CE  
実行時間 -
コード長 553 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,525 ms
コンパイル使用メモリ 183,008 KB
最終ジャッジ日時 2026-03-26 21:38:26
合計ジャッジ時間 4,507 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp:588:6: error: conflicting declaration ‘mint* w’
  588 | mint*w=u+(1<<17);
      |      ^
main.cpp:583:5: note: previous declaration as ‘int w’
  583 | int w;
      |     ^
main.cpp: In function ‘int main()’:
main.cpp:623:10: error: invalid types ‘int[int]’ for array subscript
  623 |         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:12: error: invalid types ‘int[int]’ for array subscript
  625 |           w[b]+=(w[b-(1<<x)]+w[b])*8;
      |            ^
main.cpp:625:19: error: invalid types ‘int[int]’ for array subscript
  625 |           w[b]+=(w[b-(1<<x)]+w[b])*8;
      |                   ^
main.cpp:625:31: error: invalid types ‘int[int]’ for array subscript
  625 |           w[b]+=(w[b-(1<<x)]+w[b])*8;
      |                               ^
main.cpp:628:11: error: no matching function for call to ‘swap(mint*&, int&)’
  628 |       swap(v,w);
      |       ~~~~^~~~~
In file included from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/stdexcept:38,
                 from /usr/include/c++/14/system_error:43,
                 from /usr/include/c++/14/bits/ios_base.h:46,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54,
                 from main.cpp:4:
/usr/include/c++/14/bits/exception_ptr.h:229:5: note: candidate: ‘void std::__exception_ptr::swap(exception_ptr&, exception_ptr&)’
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
/usr/include/c++/14/bits/exception_ptr.h:229:25: note:   no known conversion for argument 1 from ‘mint*’ to ‘std::__exception_ptr::exception_ptr&’
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |          ~~~~~~~~~~~~~~~^~~~~
In file 

ソースコード

diff #
raw source code

#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