結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー FlkanjinFlkanjin
提出日時 2022-01-06 17:20:28
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 1,681 bytes
コンパイル時間 1,268 ms
コンパイル使用メモリ 140,260 KB
実行使用メモリ 24,516 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 03:01:47
合計ジャッジ時間 4,551 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
23,700 KB
testcase_01 AC 43 ms
23,448 KB
testcase_02 AC 43 ms
23,484 KB
testcase_03 AC 45 ms
23,568 KB
testcase_04 AC 43 ms
24,060 KB
testcase_05 AC 44 ms
23,568 KB
testcase_06 AC 44 ms
23,712 KB
testcase_07 AC 44 ms
23,892 KB
testcase_08 AC 44 ms
23,904 KB
testcase_09 AC 44 ms
23,436 KB
testcase_10 AC 44 ms
24,096 KB
testcase_11 AC 45 ms
23,568 KB
testcase_12 AC 45 ms
24,384 KB
testcase_13 AC 44 ms
24,360 KB
testcase_14 AC 44 ms
24,132 KB
testcase_15 AC 45 ms
24,516 KB
testcase_16 AC 44 ms
24,084 KB
testcase_17 AC 44 ms
23,580 KB
testcase_18 AC 44 ms
23,652 KB
testcase_19 AC 43 ms
23,664 KB
testcase_20 AC 44 ms
23,460 KB
testcase_21 AC 44 ms
23,664 KB
testcase_22 AC 44 ms
23,568 KB
testcase_23 AC 44 ms
24,396 KB
testcase_24 AC 44 ms
23,460 KB
testcase_25 AC 43 ms
23,460 KB
testcase_26 AC 44 ms
23,424 KB
testcase_27 AC 44 ms
23,904 KB
testcase_28 AC 43 ms
23,472 KB
testcase_29 AC 44 ms
23,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

const int MOD = 1'000'000'007;
const int MOD2 = 998'244'353;
const int INF = 1'000'000'000; //1e9
const int NIL = -1;
const long long LINF = 1'000'000'000'000'000'000; // 1e18
const long double EPS = 1E-10L;

template<class T, class S> inline bool chmax(T &a, const S &b){
    if(a < b){a = b; return true;}
    return false;
}
template<class T, class S> inline bool chmin(T &a, const S &b){
    if(b < a){a = b; return true;}
    return false;
}
template<class T, class Container> inline bool exist(Container &s, const T &e){
    return (s.find(e) != std::end(s));
}
template<class T> inline bool inside(T x, T lx, T rx){
    return (std::clamp(x, lx, rx) == x);
}
template<class T> inline bool inside(T x, T y, T lx, T rx, T ly, T ry){
    return inside(x, lx, rx) && inside(y, ly, ry);
}










int main(){
    int N, K, b; std::cin >> N >> K;
    int a{(N-1) % (K + 1)};
    while(1){
        std::cout << a << std::endl;
        std::cin >> b;
        if(b >= N) return 0;
        a += K + 1;
    }
    return 0;
}
0