結果
問題 | No.2545 Divide by 3 |
ユーザー |
![]() |
提出日時 | 2023-11-24 22:46:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 2,123 ms |
コンパイル使用メモリ | 196,776 KB |
最終ジャッジ日時 | 2025-02-18 00:23:51 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
#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'; } }