結果
| 問題 | No.3499 I Love DAG |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-19 18:49:43 |
| 言語 | Go (1.26.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 709 bytes |
| 記録 | |
| コンパイル時間 | 13,084 ms |
| コンパイル使用メモリ | 284,132 KB |
| 実行使用メモリ | 45,760 KB |
| 最終ジャッジ日時 | 2026-04-19 18:50:56 |
| 合計ジャッジ時間 | 19,544 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | TLE * 1 -- * 39 |
ソースコード
package main
import (
"bufio"
"fmt"
"os"
)
var scanner *bufio.Scanner
var writer *bufio.Writer
func init() {
scanner = bufio.NewScanner(os.Stdin)
scanner.Buffer(make([]byte, 1024*1024), 1024*1024)
writer = bufio.NewWriter(os.Stdout)
}
func nextInt() int {
scanner.Scan()
var x int
fmt.Sscan(scanner.Text(), &x)
return x
}
func flush() {
writer.Flush()
}
// 入力数
var arr []int
func main() {
defer flush()
N := nextInt()
M := nextInt()
arr = make([]int, N)
for i := 0; i < M; i++{
defer flush()
a := nextInt()
b := nextInt()
_ = b
if arr[a] == 0 {
arr[a] += 1
fmt.Fprintf(writer, "1\n")
flush()
}else{
fmt.Fprintf(writer, "0\n")
flush()
}
}
flush()
}