Code Formula 2014 本選

Submission #1569292

Source codeソースコード

import strutils
import sequtils

let NS1S2=readLine(stdin).split(' ')
let N=parseInt(NS1S2[0])
let S1=parseInt(NS1S2[1])
let S2=parseInt(NS1S2[2])

var A=newSeq[int64](N)
var B=newSeq[int64](N)

for i in 0..N-1:
    let AB=readLine(stdin).split(' ')
    A[i]=parseInt(AB[0])
    B[i]=parseInt(AB[1])

var ans=0

for i in 0..N-1:
    for j in i+1..N-1:
        if S1<=(A[i]-A[j])*(B[i]-B[j]) and (A[i]-A[j])*(B[i]-B[j])<=S2:
            inc(ans)

echo(ans)

Submission

Task問題 H - 平和協定
User nameユーザ名 walkre
Created time投稿日時
Language言語 Nim (0.13.0)
Status状態 TLE
Score得点 10
Source lengthソースコード長 478 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

Hint: system [Processing]
Hint: Main [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: sequtils [Processing]
Hint: [Link]
Hint: operation successful (12951 lines compiled; 2.072 sec total; 13.138MB; Release Build) [SuccessX]

Test case

Set

Set name Score得点 / Max score Cases
Sample - sample_01.txt,sample_02.txt,sample_03.txt
Subtask1 10 / 10 sample_01.txt,sample_02.txt,sample_03.txt,subtask1_01.txt,subtask1_02.txt,subtask1_03.txt,subtask1_04.txt,subtask1_05.txt,subtask1_06.txt,subtask1_07.txt,subtask1_08.txt,subtask1_09.txt,subtask1_10.txt,subtask1_11.txt,subtask1_12.txt,subtask1_13.txt,subtask1_14.txt
Subtask2 0 / 90 sample_01.txt,sample_02.txt,sample_03.txt,subtask1_01.txt,subtask1_02.txt,subtask1_03.txt,subtask1_04.txt,subtask1_05.txt,subtask1_06.txt,subtask1_07.txt,subtask1_08.txt,subtask1_09.txt,subtask1_10.txt,subtask1_11.txt,subtask1_12.txt,subtask1_13.txt,subtask1_14.txt,subtask2_01.txt,subtask2_02.txt,subtask2_03.txt,subtask2_04.txt,subtask2_05.txt,subtask2_06.txt,subtask2_07.txt,subtask2_08.txt,subtask2_09.txt,subtask2_10.txt,subtask2_11.txt,subtask2_12.txt,subtask2_13.txt,subtask2_14.txt,subtask2_15.txt,subtask2_16.txt,subtask2_17.txt,subtask2_18.txt,subtask2_19.txt,subtask2_20.txt,subtask2_21.txt,subtask2_22.txt,subtask2_23.txt,subtask2_24.txt,subtask2_25.txt,subtask2_26.txt,subtask2_27.txt,subtask2_28.txt,subtask2_29.txt,subtask2_30.txt,subtask2_31.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
sample_03.txt AC 1 ms 256 KB
subtask1_01.txt AC 6 ms 384 KB
subtask1_02.txt AC 11 ms 384 KB
subtask1_03.txt AC 10 ms 384 KB
subtask1_04.txt AC 18 ms 384 KB
subtask1_05.txt AC 6 ms 384 KB
subtask1_06.txt AC 14 ms 384 KB
subtask1_07.txt AC 4 ms 384 KB
subtask1_08.txt AC 1 ms 256 KB
subtask1_09.txt AC 22 ms 384 KB
subtask1_10.txt AC 22 ms 384 KB
subtask1_11.txt AC 22 ms 384 KB
subtask1_12.txt AC 23 ms 384 KB
subtask1_13.txt AC 23 ms 384 KB
subtask1_14.txt AC 22 ms 384 KB
subtask2_01.txt AC 61 ms 512 KB
subtask2_02.txt AC 453 ms 640 KB
subtask2_03.txt AC 240 ms 640 KB
subtask2_04.txt AC 405 ms 640 KB
subtask2_05.txt AC 2274 ms 896 KB
subtask2_06.txt AC 1932 ms 896 KB
subtask2_07.txt AC 212 ms 512 KB
subtask2_08.txt AC 536 ms 640 KB
subtask2_09.txt AC 1867 ms 896 KB
subtask2_10.txt TLE
subtask2_11.txt TLE
subtask2_12.txt TLE
subtask2_13.txt TLE
subtask2_14.txt TLE
subtask2_15.txt TLE
subtask2_16.txt TLE
subtask2_17.txt TLE
subtask2_18.txt TLE
subtask2_19.txt TLE
subtask2_20.txt TLE
subtask2_21.txt TLE
subtask2_22.txt TLE
subtask2_23.txt TLE
subtask2_24.txt TLE
subtask2_25.txt TLE
subtask2_26.txt TLE
subtask2_27.txt TLE
subtask2_28.txt TLE
subtask2_29.txt TLE
subtask2_30.txt AC 1594 ms 1152 KB
subtask2_31.txt AC 1338 ms 1152 KB