結果

問題 No.2700 Please Hack Greedy Solution!
コンテスト
ユーザー Theresa Apocalypse
提出日時 2025-11-12 22:51:52
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 500 ms
コード長 991 bytes
コンパイル時間 1,936 ms
コンパイル使用メモリ 195,884 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-12 22:51:55
合計ジャッジ時間 2,663 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
#define endl '\n'

using namespace std;

using LL = long long;
using LD = long double;
using PII = pair<int,int>;
using PLL = pair<LL,LL>;

const LL M = 1e9 + 7;

mt19937 rd(chrono::steady_clock::now().time_since_epoch().count());

int main(){
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int T = 1;
    // cin>>T;
    while(T--){
        int n = 1000;
        // cin >> n;
        vector<int> a(n+1);
        a[0] = 1;
        a[1] = n;
        a[2] = n + 1;
        for(int i=3;i<=n;i++){
            // a[i] = n * (i - 1) + 1;
            a[i] = a[i-1] + a[1] + 1;
        }
        // cout<<n<<endl;
        cout << n << " " << n << endl;
        // cout<<1<<" "<<1<<endl;
        for(int i=1;i<=n;i++){
            cout << a[i] << " " << i << endl;
            // cout<<i<<" "<<a[i]<<endl;
        }
        vector<int> dp(n+1);
        if(0) yes: cout<<"YES"<<endl;
        if(0) no:  cout<<"NO"<<endl;
    }
}
/*
1 4
2 5
3 10
4 15

1 3
2 7

*/
0