結果

問題 No.250 atetubouのzetubou
ユーザー fmhrfmhr
提出日時 2015-07-29 11:23:56
言語 Go
(1.22.1)
結果
RE  
実行時間 -
コード長 515 bytes
コンパイル時間 10,752 ms
コンパイル使用メモリ 223,300 KB
実行使用メモリ 19,328 KB
最終ジャッジ日時 2024-04-19 03:04:42
合計ジャッジ時間 11,591 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 8 ms
19,200 KB
testcase_21 AC 8 ms
19,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
)

func main() {
	solve()
}

func solve(){
	pascal()
	var Q int
	fmt.Scan(&Q)
	var d, x, t uint64
	for i:=0; i<Q; i++ {
	    fmt.Scan(&d, &x, &t)
		//fmt.Println(p[d+x-1][x])
		if p[d+x-1][x]<=t{
			fmt.Println("AC")
		}else{
			fmt.Println("ZETUBOU")
		}
	}
}

const MAX = 1500
var p [MAX][MAX]uint64
func pascal(){
	p[0][0] = 1
	for i:=1; i<MAX; i++{
		for j:=0; j<MAX; j++{
			if j == 0{
				p[i][j] = p[i-1][j]
			}else{
				p[i][j] = (p[i-1][j-1]+p[i-1][j])
			}
		}
	}
	return
}
0