結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
fmhr
|
| 提出日時 | 2015-07-29 16:52:04 |
| 言語 | Go (1.23.4) |
| 結果 |
OLE
|
| 実行時間 | - |
| コード長 | 651 bytes |
| コンパイル時間 | 11,353 ms |
| コンパイル使用メモリ | 234,836 KB |
| 実行使用メモリ | 38,036 KB |
| 最終ジャッジ日時 | 2024-10-10 19:46:46 |
| 合計ジャッジ時間 | 24,137 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | OLE * 1 -- * 19 |
ソースコード
package main
import (
"fmt"
)
func main() {
solve()
}
func solve(){
pascal()
fmt.Println(S)
var Q int
fmt.Scan(&Q)
var d, x, t int
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 S = 1000000000000000
const MAX = 3000
var p [MAX][MAX]int
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{
if p[i-1][j-1]+p[i-1][j]<0{
p[i][j] = p[i-1][j]
}else{
p[i][j] = (p[i-1][j-1]+p[i-1][j])
}
}
fmt.Println(p[i][j])
}
}
return
}
fmhr