結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー RTnFRTnF
提出日時 2019-08-09 18:27:05
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 1,408 bytes
コンパイル時間 1,833 ms
コンパイル使用メモリ 198,776 KB
実行使用メモリ 24,396 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 02:18:41
合計ジャッジ時間 4,815 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
23,376 KB
testcase_01 AC 37 ms
24,312 KB
testcase_02 AC 36 ms
23,400 KB
testcase_03 AC 36 ms
24,036 KB
testcase_04 AC 45 ms
24,336 KB
testcase_05 AC 38 ms
23,640 KB
testcase_06 AC 38 ms
24,264 KB
testcase_07 AC 40 ms
24,396 KB
testcase_08 AC 40 ms
23,400 KB
testcase_09 AC 36 ms
24,000 KB
testcase_10 AC 36 ms
23,652 KB
testcase_11 AC 37 ms
24,384 KB
testcase_12 AC 38 ms
23,664 KB
testcase_13 AC 37 ms
23,628 KB
testcase_14 AC 41 ms
23,340 KB
testcase_15 AC 37 ms
23,628 KB
testcase_16 AC 35 ms
23,364 KB
testcase_17 AC 36 ms
23,220 KB
testcase_18 AC 40 ms
23,652 KB
testcase_19 AC 38 ms
23,508 KB
testcase_20 AC 35 ms
23,664 KB
testcase_21 AC 36 ms
23,520 KB
testcase_22 AC 35 ms
24,348 KB
testcase_23 AC 36 ms
23,508 KB
testcase_24 AC 36 ms
24,264 KB
testcase_25 AC 37 ms
24,024 KB
testcase_26 AC 37 ms
23,388 KB
testcase_27 AC 36 ms
23,328 KB
testcase_28 AC 35 ms
24,012 KB
testcase_29 AC 36 ms
23,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using vp = vector<pll>;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define repr(i, a, b) for(ll i = (a); i < (b); i++)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((ll)(x).size())
const ll MOD = 1000000007;
const ll INF = 100000000000000000LL;
inline ll GCD(ll a, ll b){ return b?GCD(b, a % b):a; }
inline ll LCM(ll a, ll b){ return a/GCD(a, b)*b; }
inline ll powint(ll x, ll y){ ll r=1; while(y){ if(y&1) r*=x; x*=x; y>>=1; } return r; }
inline ll powmod(ll x, ll y, ll m = MOD){ ll r=1; while(y){ if(y&1) r*=x; x*=x; r%=m; x%=m; y>>=1; } return r; }
template<class T>bool chmax(T &a, const T &b){ if(a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b){ if(b<a) { a=b; return 1; } return 0; }
#ifdef OJ_LOCAL
#include "dump.hpp"
#else
#define dump(...) ((void)0)
#endif

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    ll n, k;
    cin >> n >> k;
    ll me = (n-1) % (k+1);
    cout << me << endl;
    while(1){
        ll op;
        cin >> op;
        if(op >= n) break;
        me += k+1;
        cout << me << endl;
    }
    return 0;
}
0