結果

問題 No.206 数の積集合を求めるクエリ
ユーザー ciel
提出日時 2015-05-09 15:16:52
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1,133 ms / 7,000 ms
コード長 190 bytes
コンパイル時間 1,464 ms
コンパイル使用メモリ 159,460 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 21:14:07
合計ジャッジ時間 10,214 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<bits/stdc++.h>
      |  ^~~~~~
main.cpp:2:21: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    2 | using namespace std;main(){bitset<1<<17>a,b;int L,M,Q;cin>>L>>M>>Q;for(;L--;)cin>>Q,a.set(Q);for(;M--;)cin>>Q,b.set(Q);for(cin>>Q;Q--;b<<=1)cout<<(a&b).count()<<endl;}
      |                     ^~~~

ソースコード

diff #

#import<bits/stdc++.h>
using namespace std;main(){bitset<1<<17>a,b;int L,M,Q;cin>>L>>M>>Q;for(;L--;)cin>>Q,a.set(Q);for(;M--;)cin>>Q,b.set(Q);for(cin>>Q;Q--;b<<=1)cout<<(a&b).count()<<endl;}
0