Submission #6689351

Source Code Expand

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
//#define MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

char s[100010];
ll a[100010];
int main(){
	ll n=strlen(s);
	for(int i=0;i<n;){
		int l=i;
		int m=i;
		int r=i;
		a[m  ]=(m-l)/2+(r-m+1)/2;
	rep(i,0,n)printf("%lld ",a[i]);

Submission Info

Submission Time
Task D - Gathering Children
User kyopro_friends
Language C (GCC 5.4.1)
Score 400
Code Size 1066 Byte
Status AC
Exec Time 10 ms
Memory 1280 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:24:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]

Judge Result

Set Name All Sample
Score / Max Score 400 / 400 0 / 0
AC × 21
AC × 3
Set Name Test Cases
All sample_01, sample_02, sample_03, testcase_01, testcase_02, testcase_03, testcase_04, testcase_05, testcase_06, testcase_07, testcase_08, testcase_09, testcase_10, testcase_11, testcase_12, testcase_13, testcase_14, testcase_15, testcase_16, testcase_17, testcase_18
Sample sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
sample_01 AC 0 ms 128 KB
sample_02 AC 1 ms 128 KB
sample_03 AC 1 ms 128 KB
testcase_01 AC 6 ms 896 KB
testcase_02 AC 6 ms 768 KB
testcase_03 AC 9 ms 1280 KB
testcase_04 AC 10 ms 1280 KB
testcase_05 AC 6 ms 512 KB
testcase_06 AC 7 ms 640 KB
testcase_07 AC 9 ms 896 KB
testcase_08 AC 9 ms 1152 KB
testcase_09 AC 2 ms 256 KB
testcase_10 AC 8 ms 512 KB
testcase_11 AC 9 ms 1280 KB
testcase_12 AC 9 ms 1152 KB
testcase_13 AC 9 ms 1152 KB
testcase_14 AC 9 ms 512 KB
testcase_15 AC 8 ms 512 KB
testcase_16 AC 8 ms 512 KB
testcase_17 AC 9 ms 512 KB
testcase_18 AC 1 ms 128 KB