結果

問題 No.3398 Accuracy of Integer Division Approximate Function 2
コンテスト
ユーザー 👑 Mizar
提出日時 2025-12-06 00:37:42
言語 cLay
(20241019-1 + boost 1.89.0)
結果
CE  
実行時間 -
コード長 344 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,996 ms
コンパイル使用メモリ 449,996 KB
最終ジャッジ日時 2025-12-06 00:37:48
合計ジャッジ時間 5,791 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:264:11: error: no matching function for call to ‘wt_L()’
  264 |       wt_L();
      |       ~~~~^~
main.cpp:56:31: note: candidate: ‘template<class T> void wt_L(const std::vector<_Tp>&)’
   56 | template<class T> inline void wt_L(const vector<T> &x);
      |                               ^~~~
main.cpp:56:31: note:   template argument deduction/substitution failed:
main.cpp:264:11: note:   candidate expects 1 argument, 0 provided
  264 |       wt_L();
      |       ~~~~^~
main.cpp:57:31: note: candidate: ‘template<class T> void wt_L(const std::set<T>&)’
   57 | template<class T> inline void wt_L(const set<T> &x);
      |                               ^~~~
main.cpp:57:31: note:   template argument deduction/substitution failed:
main.cpp:264:11: note:   candidate expects 1 argument, 0 provided
  264 |       wt_L();
      |       ~~~~^~
main.cpp:58:31: note: candidate: ‘template<class T> void wt_L(const std::multiset<T>&)’
   58 | template<class T> inline void wt_L(const multiset<T> &x);
      |                               ^~~~
main.cpp:58:31: note:   template argument deduction/substitution failed:
main.cpp:264:11: note:   candidate expects 1 argument, 0 provided
  264 |       wt_L();
      |       ~~~~^~
main.cpp:59:42: note: candidate: ‘template<class T1, class T2> void wt_L(std::pair<_T1, _T2>)’
   59 | template<class T1, class T2> inline void wt_L(const pair<T1,T2> x);
      |                                          ^~~~
main.cpp:59:42: note:   template argument deduction/substitution failed:
main.cpp:264:11: note:   candidate expects 1 argument, 0 provided
  264 |       wt_L();
      |       ~~~~^~
main.cpp:60:13: note: candidate: ‘void wt_L(char)’
   60 | inline void wt_L(const char a){
      |             ^~~~
main.cpp:60:13: note:   candidate expects 1 argument, 0 provided
main.cpp:63:13: note: candidate: ‘void wt_L(int)’
   63 | inline void wt_L(int x){
      |             ^~~~
ma

ソースコード

diff #
raw source code

ll@T;REP(T){cpp_int D,A,B,K,n,a,b,c,d,m,x,g,r,l=0,h,q,s,v;cin>>D>>A>>B>>K;D/=g=gcd(D,A);A/=g;if(A*B%D<1&&D*K+2>A){wt(-1);}else{h=A*B*K+2;while(l+1<h){x=n=(l+h)/2;a=B;b=-A*B/D;c=D;m=A;s=v=d=0;while(a+=c/m*b,c%=m,s+=d/m*b,d%=m,v>?=s,v>?=s+a*~-n+b*(q=(c*~-n+d)/m),n=q){s+=(a+b)*(a<0);d=m+~d;swap(a,b);swap(c,m);}(v<=B*K?l:h)=x;}cout<<g*D*l;wt();}}
0