Submission #7079081


Source Code Expand

Copy
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) > (b) ? (b) : (a))
#define abs(x) ((x) > 0 ? (x) : -(x))
#define MOD (ll)1000000007 //10^9 + 7
#define endl printf("\n")
typedef long long ll;
#define MAX_N (1 << 17)

int
main(int argc, char *argv[])
{
  ll k;
  scanf("%lld", &k);

  ll n = (ll)50;
  ll a = k / n;
  ll b = k % n;

  printf("50\n");
  for (ll i = 0; i < b; i++) {
    printf("%lld ", n - i + a);
  }
  for (ll i = 0; i < n - b; i++) {
    printf("%lld ", n - b - 1 - i + a);
  } endl;

  return 0;
}

Submission Info

Submission Time
Task D - Decrease (Contestant ver.)
User Doremi
Language C (GCC 5.4.1)
Score 600
Code Size 685 Byte
Status
Exec Time 2 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:19:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld", &k);
   ^

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example0, example1, example2, example3, example4
All 600 / 600 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 1 ms 128 KB
corner1 1 ms 128 KB
corner2 2 ms 128 KB
corner3 1 ms 128 KB
corner4 1 ms 128 KB
corner5 1 ms 128 KB
corner6 1 ms 128 KB
corner7 1 ms 128 KB
corner8 1 ms 128 KB
corner9 1 ms 128 KB
example0 1 ms 128 KB
example1 1 ms 128 KB
example2 1 ms 128 KB
example3 1 ms 128 KB
example4 1 ms 128 KB
rand0 1 ms 128 KB
rand1 1 ms 128 KB
rand2 1 ms 128 KB
rand3 1 ms 128 KB
rand4 1 ms 128 KB
rand5 1 ms 128 KB
rand6 1 ms 128 KB
rand7 1 ms 128 KB
rand8 1 ms 128 KB
rand9 1 ms 128 KB