結果
| 問題 | No.3502 GCD Knapsack |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2026-04-17 21:49:47 |
| 言語 | cLay (20250308-1 + boost 1.92.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 211 bytes |
| 記録 | |
| コンパイル時間 | 1,803 ms |
| コンパイル使用メモリ | 206,356 KB |
| 実行使用メモリ | 7,936 KB |
| 最終ジャッジ日時 | 2026-09-07 23:33:07 |
| 合計ジャッジ時間 | 9,073 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 5 TLE * 1 -- * 29 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:147:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
147 | for(auto[k,v]:s){
| ^
main.cpp:157:11: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
157 | for(auto[k,v]:s){
| ^
ソースコード
ll@n,@w,@x[n],@y[n];
map<ll,ll>s,t;
rep(i,n){
if(x[i]>=w){
t[x[i]]=y[i];
for(auto[k,v]:s){
ll g=gcd(k,x[i]);
if(g>=w){
t[g]>?=v+y[i];
}
}
}
s=t;
}
ll z=0;
for(auto[k,v]:s){
z>?=v;
}
wt(z);
tails