結果
問題 | No.2828 Remainder Game |
ユーザー |
![]() |
提出日時 | 2024-08-02 23:00:20 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 72 ms / 2,000 ms |
コード長 | 675 bytes |
コンパイル時間 | 2,667 ms |
コンパイル使用メモリ | 246,264 KB |
実行使用メモリ | 25,208 KB |
平均クエリ数 | 22.00 |
最終ジャッジ日時 | 2024-08-02 23:00:26 |
合計ジャッジ時間 | 5,330 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template <class T> using V=vector<T>; template <class T> using VV=V<V<T>>; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; ll ans=0; for(int i=9;i>=0;i--){ V<int> A; for(int j=1;j<=1000;j++){ if((j&(1<<i))>0) A.push_back(j); } int k=A.size(); cout<<10000<<" "<<k<<endl; rep(j,k){ if(j) cout<<" "; cout<<A[j]; } cout<<endl; int c; cin>>c; ans+=c*(1<<i); } cout<<0<<" "<<1<<endl; cout<<ans<<endl; return 0; }