Contest Duration: - (local time) (100 minutes) Back to Home

Submission #1465126

Source Code Expand

Copy
```#include <iostream>
#include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <set>
#include <cstring>
#include <map>
#include <bitset>
#include <random>
#include <stack>
#include <list>
#include <unordered_set>
#include <unordered_map>
#include <ctime>

using namespace std;

#define ll long long
#define ld long double
#define pb push_back
#define sc second
#define fs first
#define mp make_pair
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

template<class T> T sqr(T x) { return x*x; }
ld pi = 3.1415926535897932384626433832795;
ll mod = 1e9 + 7;
const int N = 1e6 + 10;

typedef vector<vector<ll> > mtrx;

ll gcd(ll a, ll b) {
return b ? gcd(b, a % b) : a;
}

ll ans[111];

int main(){
ll k;
cin >> k;
if (k == 1) {
cout << 3 << '\n' << 0 << ' ' << 0 << 3;
}
else if (k == 2) {
cout << 2 << '\n' << 2 << ' ' << 2;
} else if (k < 1000)
cout << 2 << '\n' << 2 - 1 << ' ' << 2ll - 1ll + k;
else {
ll n = 50;
ll cur = k;
for (int i = 0; i < n; i++) {
ans[i] = n - 1;
ll add = min(cur, k / n);
}
ans[0] += cur;
cout << n << endl;
for (int i = 0; i < n; i++) {
cout << ans[i] << ' ';
}
}
return 0;
}```

Submission Info

Submission Time 2017-07-29 21:31:30+0900 D - Decrease (Contestant ver.) theconfessor C++14 (GCC 5.4.1) 0 1303 Byte WA 1 ms 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 600
Status
 AC × 3 WA × 2
 AC × 6 WA × 19
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 WA 1 ms 256 KB
corner1 AC 1 ms 256 KB
corner2 AC 1 ms 256 KB
corner3 WA 1 ms 256 KB
corner4 WA 1 ms 256 KB
corner5 WA 1 ms 256 KB
corner6 WA 1 ms 256 KB
corner7 WA 1 ms 256 KB
corner8 AC 1 ms 256 KB
corner9 WA 1 ms 256 KB
example0 AC 1 ms 256 KB
example1 WA 1 ms 256 KB
example2 AC 1 ms 256 KB
example3 AC 1 ms 256 KB
example4 WA 1 ms 256 KB
rand0 WA 1 ms 256 KB
rand1 WA 1 ms 256 KB
rand2 WA 1 ms 256 KB
rand3 WA 1 ms 256 KB
rand4 WA 1 ms 256 KB
rand5 WA 1 ms 256 KB
rand6 WA 1 ms 256 KB
rand7 WA 1 ms 256 KB
rand8 WA 1 ms 256 KB
rand9 WA 1 ms 256 KB