結果
問題 | No.1589 Bit Vector |
ユーザー |
|
提出日時 | 2021-07-09 00:39:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 515 ms |
コンパイル使用メモリ | 65,324 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 13:47:18 |
合計ジャッジ時間 | 2,384 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; int N,K; main() { cin>>N>>K; cout<<N*(N-1)/2*3+2<<endl; for(int i=1;i<N;i++)for(int j=N-1;j>=i;j--) { cout<<"XOR "<<N<<" "<<j-1<<" "<<j<<endl; cout<<"AND "<<j<<" "<<j-1<<" "<<j<<endl; cout<<"XOR "<<j-1<<" "<<j<<" "<<N<<endl; } cout<<"UPD "<<N<<" 0"<<endl; cout<<"XOR "<<N<<" "<<K-1<<" "<<N<<endl; }