結果
問題 |
No.1880 Many Ways
|
ユーザー |
👑 ![]() |
提出日時 | 2022-03-18 21:58:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 839 bytes |
コンパイル時間 | 686 ms |
コンパイル使用メモリ | 79,144 KB |
最終ジャッジ日時 | 2025-01-28 10:21:31 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 12 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <atcoder/modint> using namespace std; using i64 = long long; using m32 = atcoder::static_modint<998244353>; #define rep(i,n) for(int i=0; i<(int)(n); i++) int D = 39; int main(){ i64 A; cin >> A; vector<pair<int,int>> ans; rep(s,2) rep(t,2) rep(i,D) ans.push_back({ 2+3*i+s, 2+3*(i+1)+t }); rep(s,2) ans.push_back({ 1, 2+s }); rep(i,D) ans.push_back({ 2+3*i+2, 2+3*(i+1)+2 }); int N = 1 + (D+1) * 3; rep(d,D+1) if((A>>(D-d)) & 1) ans.push_back({ 2+3*d+0, 2+3*d+2 }); cout << N << ' ' << ans.size() << '\n'; for(auto [u,v] : ans) cout << u << ' ' << v << '\n'; return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ std::ios::sync_with_stdio(false); std::cin.tie(nullptr); } } ios_do_not_sync_instance;