結果
問題 | No.2700 Please Hack Greedy Solution! |
ユーザー | kokosei |
提出日時 | 2024-03-29 22:51:53 |
言語 | C++23 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 500 ms |
コード長 | 538 bytes |
コンパイル時間 | 939 ms |
コンパイル使用メモリ | 96,360 KB |
実行使用メモリ | 6,676 KB |
最終ジャッジ日時 | 2024-03-29 22:52:01 |
合計ジャッジ時間 | 1,580 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; using ll = long long; int main(void){ ios::sync_with_stdio(false); cin.tie(nullptr); int N = 1000, W = 1000; cout << N << " " << W << "\n"; cout << 2000 << " " << 1 << "\n"; vector<pair<int, int>> a; int sum = 2001; for(int i = 2;i <= W;i++){ a.push_back({sum, i}); sum += 2001; } reverse(a.begin(), a.end()); for(auto [v, w] : a){ cout << v << " " << w << "\n"; } return 0; }