Submission #1464944


Source Code Expand

Copy
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>

#define REP(i,x) for(int i=0 ; i<(int)(x) ; i++)
#define ALL(x) (x).begin(),(x).end()
#define LL long long

using namespace std;

int main(){
    LL K;
    cin >> K;
    int N = 50;
    vector<LL> A(N);

    int m = K % N;
    REP(i, m)A[i] = N-i;
    for(int i=m; i<N; i++){
        A[i] = i-m;
    }

    K -= m;
    K /= N;
    cout << N << endl;
    REP(i, N){
        cout << A[i]+K << (i==N-1 ? '\n' : ' ');
    }

    return 0;
}

Submission Info

Submission Time
Task D - Decrease (Contestant ver.)
User nel215
Language C++14 (GCC 5.4.1)
Score 600
Code Size 767 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 600 / 600
Status
AC × 5
AC × 25
Set Name Test Cases
Sample example0, example1, example2, example3, example4
All corner0, corner1, corner2, corner3, corner4, corner5, corner6, corner7, corner8, corner9, example0, example1, example2, example3, example4, rand0, rand1, rand2, rand3, rand4, rand5, rand6, rand7, rand8, rand9
Case Name Status Exec Time Memory
corner0 AC 1 ms 256 KB
corner1 AC 1 ms 256 KB
corner2 AC 1 ms 256 KB
corner3 AC 1 ms 256 KB
corner4 AC 1 ms 256 KB
corner5 AC 1 ms 256 KB
corner6 AC 1 ms 256 KB
corner7 AC 1 ms 256 KB
corner8 AC 1 ms 256 KB
corner9 AC 1 ms 256 KB
example0 AC 1 ms 256 KB
example1 AC 1 ms 256 KB
example2 AC 1 ms 256 KB
example3 AC 1 ms 256 KB
example4 AC 1 ms 256 KB
rand0 AC 1 ms 256 KB
rand1 AC 1 ms 256 KB
rand2 AC 1 ms 256 KB
rand3 AC 1 ms 256 KB
rand4 AC 1 ms 256 KB
rand5 AC 1 ms 256 KB
rand6 AC 1 ms 256 KB
rand7 AC 1 ms 256 KB
rand8 AC 1 ms 256 KB
rand9 AC 1 ms 256 KB