結果
| 問題 |
No.611 Day of the Mountain
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2017-12-22 12:10:04 |
| 言語 | cLay (20241019-1) |
| 結果 |
CE
|
| 実行時間 | - |
| コード長 | 553 bytes |
| コンパイル時間 | 2,715 ms |
| コンパイル使用メモリ | 166,164 KB |
| 最終ジャッジ日時 | 2024-07-05 12:49:57 |
| 合計ジャッジ時間 | 3,139 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、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++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from main.cpp:4:
/usr/include/c++/11/sstream:1185: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>&)’
1185 | swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/11/sstream:1185:5: note: template argument deduction/substitution failed:
main.cpp:628:11: note: mismatched types ‘std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>’ and ‘mint*’
628 | swap(v,w);
| ~~~~^~~~~
In file included from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54
ソースコード
#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)));
}
tails