8
4

0
1
2
1
0
-1
0
1

``````
//By Ceeji
//Date: 2009-4-10
//Type: Gouzao
//HAOI test 1 - Problem 1 : sum (POI)
//State : Accepted
Program sum;
Const
inf='sum.in';
ouf='sum.out';
maxn=10000;
Var
n,s,i,j,l:longint;
x:longint;
q:qword;
b:array[1..maxn]of boolean;

begin
q:=1;
assign(input,inf);  reset(input);
assign(output,ouf); rewrite(output);
fillchar(b,sizeof(b),0);
close(input);
x:=((n-1)*n div 2-s);
if odd(x) then begin writeln('NIE'); close(output); exit; end;
l:=2;
while x>=(n-l+1)<<1 do
begin
b[l]:=true;
dec(x,(n-l+1)<<1);
inc(l);
end;
l:=1;
b[n-(x>>1)+1]:=true;
j:=0;
writeln(j);
for i:=2 to n do
begin
if b[i] then dec(j) else inc(j);
inc(ans,j);
writeln(j);
end;
close(output);
end.
``````
{"ft_lang_label":"__label__zh","ft_lang_prob":0.73298603,"math_prob":0.9854751,"size":1413,"snap":"2021-04-2021-17","text_gpt3_token_len":931,"char_repetition_ratio":0.079489,"word_repetition_ratio":0.0,"special_character_ratio":0.33616418,"punctuation_ratio":0.23765433,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9990744,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-25T07:07:26Z\",\"WARC-Record-ID\":\"<urn:uuid:9c0c8299-5e05-4983-9fe7-93d4c98e3f14>\",\"Content-Length\":\"22119\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:08b4bd42-71dd-47de-86ac-1413aab6474b>\",\"WARC-Concurrent-To\":\"<urn:uuid:90c8aad2-0a75-413e-bc56-c4f1c433868d>\",\"WARC-IP-Address\":\"139.198.177.240\",\"WARC-Target-URI\":\"http://ceeji.net/blog/poi-sum-of-one-sequence-%E8%BF%9E%E7%BB%AD%E4%B8%B2%E4%B9%8B%E5%92%8C-%E8%A7%A3%E9%A2%98%E6%8A%A5%E5%91%8A/\",\"WARC-Payload-Digest\":\"sha1:MVMFV4JC6GFR2OXVHENM5MZ6KIPDYEHQ\",\"WARC-Block-Digest\":\"sha1:GLMCRP2U7SI4ZYM76I4EV6EF46LHSV24\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703565376.63_warc_CC-MAIN-20210125061144-20210125091144-00364.warc.gz\"}"}