結果

問題 No.1820 NandShift
ユーザー 沙耶花沙耶花
提出日時 2022-01-21 22:32:58
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 912 bytes
コンパイル時間 5,045 ms
コンパイル使用メモリ 262,300 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-08-17 06:49:37
合計ジャッジ時間 5,933 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint;
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define Inf 1000000001
vector<int> t,xx,ii,jj;
void q1(int x,int i){
	t.push_back(1);
	xx.push_back(x);
	ii.push_back(i);
	jj.push_back(0);
}

void q2(int x,int i,int j){
	t.push_back(2);
	xx.push_back(x);
	ii.push_back(i);
	jj.push_back(j);
}
	

int main(){
	
	int n,m;
	cin>>n>>m;
	string x;
	cin>>x;
	
	vector<string> a(n);
	rep(i,n){
		cin>>a[i];
	}
	
	int p0 = 1000,p1 = 1005;
	
	q2(p0,p0,p0);
	q2(p1,p1,p0);
	q1(p1,p1);
	int ans = 10008;
	rep(i,x.size()){
		q1(ans,ans);
		if(x[i]=='0')continue;
		q2(ans,ans,p0);
		q2(ans,ans,p1);
	}
	
	cout<<xx.size()<<endl;
	rep(i,xx.size()){
		cout<<t[i];
		if(t[i]==1){
			cout<<" "<<xx[i]<<" "<<ii[i]<<endl;
		}
		else{
			cout<<" "<<xx[i]<<" "<<ii[i]<<' '<<jj[i]<<endl;
		}
	}
	
	return 0;
}
0