結果
問題 | No.2545 Divide by 3 |
ユーザー |
![]() |
提出日時 | 2023-11-24 22:41:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 759 bytes |
コンパイル時間 | 4,095 ms |
コンパイル使用メモリ | 250,268 KB |
最終ジャッジ日時 | 2025-02-18 00:22:13 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
#include <stdio.h> #include <atcoder/all> #include <bits/stdc++.h> using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main(){ long long D = 1<<30; long long t = (D)/3; /* long long nn; cin>>nn; rep(i,nn){ int n = 1000000000-i; if(n/3 != ((n+1)*t)/D){ cout<<i<<endl; cout<<n/3<<endl; cout<<((n+1)*t)/D<<endl; } } */ cout<<78<<endl; cout<<"plus 1 1 2"<<endl; cout<<"plus 4 1 4"<<endl; rep(i,30){ if((t>>i)&1){ cout<<"plus 5 4 5"<<endl; } cout<<"plus 4 4 4"<<endl; } cout<<"plus 3 5 3"<<endl; rep(i,30){ cout<<"div 3 3"<<endl; } //cout<<__builtin_popcountll(t)<<endl; return 0; }