結果
問題 | No.1589 Bit Vector |
ユーザー |
![]() |
提出日時 | 2021-07-11 19:04:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 487 bytes |
コンパイル時間 | 2,384 ms |
コンパイル使用メモリ | 180,588 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 03:10:56 |
合計ジャッジ時間 | 4,756 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> using namespace std; int N,K; int main(){ cin.tie(0); ios::sync_with_stdio(0); cin>>N>>K; cout<<N*(N-1)/2*3+2<<'\n'; for(int b=0;b<N;++b)for(int a=0;a<b;++a){ cout<<"XOR "<<N<<' '<<a<<' '<<b<<'\n'; cout<<"AND "<<b<<' '<<a<<' '<<b<<'\n'; cout<<"XOR "<<a<<' '<<b<<' '<<N<<'\n'; } cout<<"UPD "<<N<<" 0\n"; cout<<"XOR "<<N<<' '<<K-1<<' '<<N<<'\n'; }