結果
| 問題 | No.3760 Streaming Schedule |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-09 22:16:32 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 1,011 bytes |
| 記録 | |
| コンパイル時間 | 2,129 ms |
| コンパイル使用メモリ | 355,196 KB |
| 実行使用メモリ | 9,912 KB |
| 最終ジャッジ日時 | 2026-10-09 22:16:38 |
| 合計ジャッジ時間 | 5,710 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 19 |
ソースコード
#include<bits/stdc++.h>
#define CSP2026 using
#define RP namespace
#define PLUSPLUS std
CSP2026 RP PLUSPLUS;
#define debug(x) cout<<"clock="<<clock()<<' '<<#x<<'='<<(x)<<'\n'
//#define getchar getchar_unlocked
using ll=long long;
inline int rd(){int x=0,f=1;char ch=getchar();for(;!isdigit(ch);ch=getchar())if(ch=='-')f=-1;for(;isdigit(ch);ch=getchar())x=(x<<3)+(x<<1)+(ch^48);return x*f;}
inline ll rdll(){ll x=0;int f=1;char ch=getchar();for(;!isdigit(ch);ch=getchar())if(ch=='-')f=-1;for(;isdigit(ch);ch=getchar())x=(x<<3)+(x<<1)+(ch^48);return x*f;}
constexpr int N=3e5+5;
int a[N];
signed main(){
int n=rd(),B=rd(),C=rd(),mx=0;
for(int i=1;i<=n;++i)a[i]=rd();
for(int i=0;i<(1<<n);++i){
int p=i;
bool flag=1;
while(p){
if((p&((1<<C)-1))==(1<<C)-1){flag=0;break;}
p>>=1;
}if(!flag)continue;
p=i^((1<<n)-1);
while(p){
if((p&((1<<B)-1))==(1<<B)-1){flag=0;break;}
p>>=1;
}if(!flag)continue;
int s=0;
for(int j=0;j<n;++j)s+=a[j+1]*((i>>j)&1);
mx=max(mx,s);
}cout<<mx<<'\n';
}