結果

問題 No.2545 Divide by 3
ユーザー shobonvipshobonvip
提出日時 2023-11-24 22:46:57
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 379 bytes
コンパイル時間 2,315 ms
コンパイル使用メモリ 205,996 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2023-11-24 22:47:00
合計ジャッジ時間 3,373 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
	int magic = 1431655766;
	vector<string> ans;
	for (int i=0; i<31; i++){
		if (magic >> i & 1){
			ans.push_back("plus 3 1 3");
		}
		ans.push_back("plus 1 1 1");
	}
	for (int i=0; i<32; i++){
		ans.push_back("div 3 3");
	}

	int m = ans.size();
	cout << m << '\n';
	for (int i=0; i<m; i++){
		cout << ans[i] << '\n';
	}
}
0