Submission #1463985
Source Code Expand
#include<bits/stdc++.h> #define rep(i,a,b) for(int i=a;i<b;i++) #define rrep(i,a,b) for(int i=a;i>=b;i--) #define fore(i,a) for(auto &i:a) #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------------------------- ∧_∧ ∧_∧ (´<_` ) Welcome to My Coding Space! ( ´_ゝ`) / ⌒i / \ | | / / ̄ ̄ ̄ ̄/ | __(__ニつ/ _/ .| .|____ \/____/ (u ⊃ ---------------------------------------------------------------------------------------------------*/ typedef long long ll; vector<ll> build(ll K) { vector<ll> ans; ll d = K % 50; rep(i, 0, 50 - d) ans.push_back(49 - d); rep(i, 0, d) ans.push_back(50); ll a = K / 50; rep(i, 0, 50) ans[i] += a; return ans; } //--------------------------------------------------------------------------------------------------- void _main() { ll K; cin >> K; auto ans = build(K); int n = ans.size(); printf("%d\n", n); rep(i, 0, n) { if (i) printf(" "); printf("%lld", ans[i]); } printf("\n"); }
Submission Info
Submission Time | |
---|---|
Task | D - Decrease (Contestant ver.) |
User | hamayanhamayan |
Language | C++14 (GCC 5.4.1) |
Score | 600 |
Code Size | 1530 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 600 / 600 | ||||
Status |
|
|
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 |