結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー satanicsatanic
提出日時 2016-05-14 15:28:44
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 1,028 bytes
コンパイル時間 1,564 ms
コンパイル使用メモリ 164,028 KB
実行使用メモリ 24,480 KB
平均クエリ数 2.80
最終ジャッジ日時 2023-09-23 10:37:41
合計ジャッジ時間 4,793 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
24,348 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 44 ms
24,348 KB
testcase_05 AC 44 ms
23,496 KB
testcase_06 AC 44 ms
24,348 KB
testcase_07 AC 45 ms
24,312 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 46 ms
24,444 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 44 ms
24,348 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 46 ms
23,628 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 45 ms
23,712 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 45 ms
23,616 KB
testcase_25 AC 45 ms
23,616 KB
testcase_26 AC 45 ms
24,456 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);
#define VAR(type, a) type a;std::cin>>a;
// VAR(int, x);
#define OUT(d) std::cout<<(d);
#define SP std::cout<<" ";
#define ENDL std::cout<<"\n";
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define MAT(type, c, m, n) std::vector<std::vector<type>> c(m, std::vector<type>(n));for(auto& r:c)for(auto& i:r)std::cin>>i;
#define ALL(a) (a).begin(),(a).end()
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define SHOWVECTOR2(v) {std::cout << #v << "\t:\n";for(auto i : v){for(auto j : i){std::cout << j << " ";}std::cout << "\n";}}
using ll = long long;

int main(){
    //INIT;
    VAR(int, n);VAR(int, k);
    std::cout << (n-1)%(k+1) << std::endl;
    int in;
    while(std::cin >> in, in<n){
        std::cout << (n-1)%(k+1)+(k+1)*(in/(k+1)+1) << std::endl;
    }
    return 0;
}
0