結果
| 問題 | No.3502 GCD Knapsack |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2026-04-17 21:49:47 |
| 言語 | cLay (20250308-1 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 211 bytes |
| 記録 | |
| コンパイル時間 | 2,009 ms |
| コンパイル使用メモリ | 196,228 KB |
| 実行使用メモリ | 7,936 KB |
| 最終ジャッジ日時 | 2026-04-17 21:50:19 |
| 合計ジャッジ時間 | 6,693 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge2_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